EOLE
Eole is an open language modeling toolkit built on PyTorch, originally spun off from OpenNMT-py. Train, fine-tune, evaluate, and serve encoder, decoder, and encoder-decoder models in a compact, modular codebase built for experimentation.
Use it for language generation, machine translation, neural translation scoring, vision and OCR, and speech recognition. Bring supported Hugging Face checkpoints or train your own architecture.
A local workspace, included
Chat with text and images, translate documents, extract OCR Markdown, and ask questions over a local document collection. Watch GPU usage and run a warmed benchmark from the bundled browser UI, with no frontend build step.
Watch the 39-second MP4 tour · Chat workspace · Hy-MT2 translation workspace · Knowledge (RAG)
The edited tour uses real local results: RedHat Qwen3.8-27B INT4 for visual chat, RAG answers and benchmarking, Hy-MT2-7B for translation, and DeepSeek-OCR for page extraction. The complete workspace menu stays visible. Model loading and compilation waits are omitted; the displayed generation measurements come from Eole's inference worker on an RTX 5090. Benchmark numbers measure post-first-token decode speed and depend on the prompt, settings and hardware.
Latest: 0.6.4
This release adds a browser-first RunPod deployment for Chat, translation and PDF/image OCR, with automatic model preparation and switching, optional original BF16 Qwen, and an authenticated public gateway. It also fixes DeepSeek-OCR vision head dimensions during conversion and CUDA extension verification at image startup.
Eole supports PyTorch >= 2.10 and < 2.15, including PyTorch 2.14.1. The refreshed Docker defaults use PyTorch 2.14.1 with CUDA 13.2. Start with the workspace UI, Qwen3.8/MTP recipe, or Docker guide. See the changelog for release details and remaining limitations.
Browser-based Chat, translation and OCR on a rented GPU. See the RunPod quick start for password setup, GPU choices and availability; the 0.6.4 deployment image is published after #469 merges.
Choose your workflow
| I want to… | Start here |
|---|---|
| Run a supported HF model without a separate conversion step | Direct HF inference |
| Deploy an authenticated Chat, translation and OCR workspace on a rented GPU | RunPod deployment recipe |
| Chat with a local LLM in your browser | Local workspace UI |
| Translate through a web interface: text, terminology, subtitles, and documents | Hy-MT2 translation workspace |
| Try Qwen3.8-27B with MTP speculative decoding | Qwen3.8 and MTP |
| Use Codex with a locally served Qwen model | Codex Responses API |
| Use Claude Code with a locally served Qwen model | Claude Code endpoint |
| Ask questions about your documents with sources | Local Knowledge / RAG workspace |
| Chat with images in the browser | Qwen vision Chat workspace |
| Try Qwen3.5 text and image inputs | Qwen3.5 |
| Train a translation model | WMT17 |
| Translate with a pretrained multilingual model | NLLB |
| Generate text with Mistral | Mistral |
| Fine-tune an LLM | Llama2 LoRA |
| Fine-tune with a scorer reward | REINFORCE |
| Score translations or use neural metrics during training | COMET, KIWI, XCOMET, and MetricX |
| Extract scanned PDFs through a web interface | DeepSeek-OCR / HunyuanOCR Documents workspace |
| Extract text from images and documents | HunyuanOCR or DeepSeek-OCR |
| Transcribe audio | Whisper |
| Train a language model from scratch | WikiText-103 or FineWeb |
| Evaluate model quality or inference speed | LiveCodeBench coding, MMLU, model validator, or benchmarks |
Browse the full recipe index for more workflows.
Quickstart: serve a small chat model
Run from the repository root in a Python environment with a compatible CUDA PyTorch installation and an NVIDIA GPU. See installation for requirements and optional kernels.
git clone https://github.com/eole-nlp/eole
cd eole
python -m pip install -e . --no-build-isolation
export EOLE_MODEL_DIR="$PWD/models"
mkdir -p "$EOLE_MODEL_DIR"
eole convert HF --model_dir Qwen/Qwen3.5-0.8B \
--output "$EOLE_MODEL_DIR/qwen3.5-0.8B"
eole serve -c recipes/server/serve.example.yaml --host 127.0.0.1
In a second terminal:
curl --fail-with-body http://127.0.0.1:5000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"qwen3.5-0.8B","messages":[{"role":"user","content":"Explain machine translation in one sentence."}],"max_tokens":128,"temperature":0}'
The response contains the generated text in choices[0].message.content.
Interactive API documentation is available at http://127.0.0.1:5000/docs.
The server recipe explains streaming and the supported API formats.
Features
- Training and fine-tuning: Transformer encoder, decoder, and encoder-decoder architectures, RNN encoder-decoder models, LoRA, quantized fine-tuning, dynamic data transforms, tensor parallelism, and mixed or pure BF16 training.
- Efficient inference: FlashAttention KV caching, CUDA and Triton kernels,
fused projections, quantized dense and MoE inference, chunked prefill, prefix
caching, and optional
torch.compile/ CUDA graphs. Availability depends on model, hardware, installed kernels, and configuration. - Multi-token prediction: Auxiliary MTP heads for decoder-only training and native speculative decoding for compatible checkpoints, including Qwen3.8-27B. Current inference support is text-only, single-sequence, deterministic greedy decoding; unsupported configurations fall back to ordinary decoding.
- Serving: FastAPI server with native inference, OpenAI-style chat completions, and Anthropic-style Messages endpoints, including tool-use handling.
- Evaluation: BLEU, chrF, TER, perplexity, native COMET/KIWI/XCOMET and MetricX scorers, custom scorer modules, and scorer-based early stopping.
- Reinforcement learning: On-policy REINFORCE with registered scorer rewards, batch-mean baselines, and an optional frozen reference-model KL penalty. DPO, GRPO, and PPO are planned, not implemented.
Supported Hugging Face model families
| Family / task | Examples and notes |
|---|---|
| Qwen | Qwen, Qwen2, Qwen3 (including MoE); Qwen3.5 text/vision; Qwen3.8-27B with MTP |
| Gemma | Gemma3 text/image and Gemma4 support |
| Mistral | Mistral, Mixtral, Mathstral, and supported multimodal / Ministral variants |
| Llama and Phi | Llama3.x and Phi2/3 |
| Translation | Hy-MT2 workspace; EuroLLM, NLLB, and Tower model recipes |
| OCR and vision | HunyuanOCR, DeepSeek-OCR, Pixtral, and supported vision-language checkpoints |
| Speech | Whisper |
| Translation scoring | COMET, COMET-KIWI, XCOMET, MetricX, and MetricX-QE |
Support is architecture-specific; this table does not imply every checkpoint, quantization format, or modality in a family is supported. Consult the relevant recipe and converter for the exact configuration. Supported HF checkpoints can also be used directly for inference; conversion creates a reusable Eole artifact.
Performance and reproducibility
See the inference benchmarks for example scripts and historical results (with incomplete environment metadata), and the compilation guide for
torch.compile configuration. Separate compilation/warmup from repeated warm
runs. Throughput depends on model, precision, prompt length, generation length,
and batch size; benchmark results are not a universal ranking of engines.
The MTP recipe includes a baseline comparison and acceptance diagnostics. GPU speedup and production BF16/quantized token parity must be measured on the chosen checkpoint.
Installation
From source
- Python >= 3.11 (current CI uses Python 3.12).
- PyTorch >= 2.10 and < 2.15, with a CUDA build compatible with your GPU and driver.
- To compile CUDA extensions: the CUDA toolkit (
nvcc), a compatible C++ compiler, and the build dependencies below. The CUDA runtime bundled with PyTorch alone does not providenvcc.
Install CUDA-enabled PyTorch first in your chosen environment, then run from the repository root:
python -m pip install "setuptools<69" wheel packaging ninja psutil
python -c 'import torch; print(torch.__version__, torch.version.cuda); print("GPU available:", torch.cuda.is_available())'
nvcc --version
MAX_JOBS=2 python -m pip install -e . --no-build-isolation
setup.py builds Eole's eole._ops CUDA extension, including normalization,
rotary embeddings, activations, and Marlin quantization kernels. It only enables
the extension when PyTorch is installed and torch.cuda.is_available() is true.
--no-build-isolation lets the build use that PyTorch installation. MAX_JOBS
limits compilation memory use; increase it if your machine has sufficient RAM.
Build kernels for running directly from a clone
If your environment already contains Eole's Python dependencies and you prefer to run scripts without installing the package, build the extension in place:
# Run from the repository root, with CUDA-enabled PyTorch and build tools above.
MAX_JOBS=2 python setup.py build_ext --inplace
export PYTHONPATH="$PWD${PYTHONPATH:+:$PYTHONPATH}"
python -m eole.bin.main --help
This builds eole/_ops*.so; it does not install Python dependencies or the
eole console command. Use python -m eole.bin.main in place of eole in recipes.
Rebuild after changing PyTorch, CUDA, Python, or extension sources. The current
build targets the visible GPU's compute capability; it is not a universal wheel
for every GPU architecture. A successful command on a CPU-only environment may
skip the extension entirely. Check it in the GPU environment:
python -c 'import torch; from eole import _ops; assert torch.cuda.is_available(); print("Eole CUDA extension loaded")'
FlashAttention and hybrid-attention kernels
Install these separately in the same Python environment. FlashAttention is
optional for the small-model quickstart, which uses self_attn_backend: pytorch.
For recipes selecting self_attn_backend: flash, follow the
FlashAttention installation requirements:
MAX_JOBS=2 python -m pip install flash-attn --no-build-isolation
python -c 'from flash_attn import flash_attn_func, flash_attn_with_kvcache; print("FlashAttention interfaces loaded")'
Use a release or wheel compatible with your GPU, Python, PyTorch, and CUDA versions. The Qwen3.8 measurements used FlashAttention 2.8.3; installing a newer package alone does not reproduce that environment.
For Qwen3.5/Qwen3.8 fast gated-delta computation, install
FLA kernels (fla-core):
python -m pip install fla-core
python -c 'from fla.ops.gated_delta_rule import chunk_gated_delta_rule, fused_recurrent_gated_delta_rule; print("FLA gated-delta interfaces loaded")'
Eole also supports the separate CUDA convolution package:
MAX_JOBS=2 python -m pip install causal-conv1d --no-build-isolation
When causal-conv1d is absent, Eole can use FLA's convolution implementation;
without either, it has a PyTorch fallback. FLA uses Triton kernels compiled at
runtime. Import checks confirm availability, not kernel execution or backend
selection; inspect the recipe's backend diagnostics during a GPU run. INT4
Marlin recipes require Eole's compiled CUDA extension.
Install other optional task dependencies as needed:
python -m pip install -r requirements.opt.txt
Use HF_TOKEN with --token "$HF_TOKEN" for checkpoints requiring Hugging Face
authentication. See individual recipes for model-specific requirements.
Docker
Requires Docker, a compatible NVIDIA driver, and the NVIDIA Container Toolkit.
Use a published image or build an image from your checkout (the tested default is PyTorch 2.14.1 / CUDA 13.2). Images include the Chat, Translate, Documents and Knowledge dependencies. The Docker guide covers GPU prerequisites, local builds, CUDA kernels, model/data mounts, YAML inference and training, and serving an API endpoint.
Release images contain that release's features; use a current checkout image for newer features such as MTP. Eole's CUDA extension must be built with GPU access, which a normal Docker image build does not provide.
Documentation and contributing
Use Discussions for questions and feature proposals, and Issues for bugs.
Metadata
Release files for eole 0.6.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eole-0.6.4.tar.gz | 745.5 kB | Without provenance | Details for eole-0.6.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eole-0.6.4-py3-none-any.whl | Python 3 | none | any | Details for eole-0.6.4-py3-none-any.whl |
Total release size: 1.6 MB
Release files / eole-0.6.4.tar.gz
| Download URL | eole-0.6.4.tar.gz |
|---|---|
| Size | 745.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91476eb236f49441e0dc3e566b8d4b94dfe086e7887dc3603a315433983f94a6
|
|
BLAKE2b-256 checksum How to use checksums |
92e85244e3ec8fcf6d30ad179c28cf4ff68be6113cbe9f390fd9e5a2ec215b1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / eole-0.6.4-py3-none-any.whl
| Download URL | eole-0.6.4-py3-none-any.whl |
|---|---|
| Size | 860.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f19715bde30bf0fb5885d5b2b0659dba463d51ecd603c3e5c84a48214c28c5de
|
|
BLAKE2b-256 checksum How to use checksums |
c135e79589b4466192c5b9713fc98c248915bf357e83b5a31b97395ed3c82433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for eole 0.6.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.