Model or dataset
chiennv2000/orthrus avatar
chiennv2000/orthrus

Orthrus: Dual-View Diffusion Decoding That Keeps the Base Model's Distribution

Fast, lossless LLM inference via dual-view diffusion decoding.

482 stars22 forksPythonMIT

At a glance

What is it?
Orthrus is an MIT-licensed Python framework that adds a parallel diffusion view to a frozen Qwen3 backbone, promising lossless generation with a small KV cache overhead. The speedup numbers come from the project's own README, and the release history is thin.
Who is it for?
Adopt Orthrus if you are already running Qwen3-1.7B, 4B or 8B checkpoints and you want to test whether parallel token generation holds up on your own prompts without changing the output distribution. Do not adopt it if you need a stable serving stack: there is no release, no version pin, and the README says vLLM and SGLang integration is still coming.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 34 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The problem Orthrus targets: sequential decoding is the bottleneck, but draft models cost memory

Autoregressive decoding emits one token per forward pass, so generation time scales with output length. Speculative decoding attacks this by running a small draft model ahead and verifying its guesses with the full model. That works, but it introduces a second set of weights and a second KV cache, and the README argues this is exactly where the approach degrades: Orthrus is presented as beating speculative methods like EAGLE-3 and DFlash because it shares one KV cache across both views instead of maintaining a draft model's cache alongside it. The claimed consequence is that acceptance rates stay high as context grows, and the README specifically contrasts Orthrus with DFlash at 40K context, where it says DFlash degrades rapidly. Diffusion language models are the other comparison point. The README states that existing dLLMs suffer from conditional drift and accuracy loss on reasoning tasks, and that Orthrus decouples parallel generation from sequential constraints to avoid that. The audience is narrow and clear: people running Qwen3 checkpoints who care about exact output fidelity and have the hardware to compile flash-attn.

Dual-view architecture: one frozen backbone, two decoding modes, one KV cache

The README describes a dual-architecture framework with an autoregressive view and a diffusion view sharing the same backbone. Both views attend to the same KV cache, which is where the O(1) memory overhead claim comes from: there is no separate draft model, so adding the parallel path does not add a second cache proportional to context length. The parallel capability is injected by fine-tuning roughly 16% of total parameters while the base LLM stays frozen, according to the README. That number matters because it means the published checkpoints are not retrained from scratch; they are Qwen3 weights plus an adapter-sized set of trained parameters. The README calls the result strictly lossless and attributes it to an exact intra-model consensus mechanism that matches the base model's predictive distribution. That is the central claim and also the hardest one to check without running the code: the README does not give the consensus algorithm in prose, so the verification path is empirical, comparing outputs from use_diffusion_mode=True against the same model with diffusion disabled. The model zoo lists three checkpoints (1.7B, 4B, 8B) with average speedups of 4.25x, 5.20x and 5.36x respectively, and a separate claim of up to 7.8x on generation tasks.

Installing Orthrus and the flags that switch on diffusion decoding

Installation is a source checkout plus three pip steps, and the README recommends uv for dependency resolution: uv pip install -e . followed by uv pip install ninja packaging, then uv pip install flash-attn --no-build-isolation, with an alternative of pip install "flash-attn-4[cu13]" if the device supports it. The flash-attn step is the one most likely to fail, since it requires a compiler toolchain and the ninja and packaging packages are installed first for that reason. Loading a model uses the standard transformers path with trust_remote_code=True, because the diffusion generation path is custom code: AutoModelForCausalLM.from_pretrained("chiennv/Orthrus-Qwen3-8B", dtype=torch.bfloat16, device_map="cuda", attn_implementation="flash_attention_2"). The README lists sdpa, eager and flash_attention_4 as alternatives to flash_attention_2, so a machine without flash-attn can still load the model. Generation is standard model.generate() with two additions: use_diffusion_mode=True and optionally a TextStreamer for streaming output. The chat template call passes enable_thinking=False, which is a Qwen3-specific flag and worth noting if you expect thinking-mode output. There is also a Colab notebook linked from the quickstart, which is the cheapest way to see the API before installing anything locally.

MLX support on Apple Silicon is a separate code path with its own API

The README documents native Apple Silicon inference through MLX, tested with mlx==0.31.2 and mlx-lm==0.31.3. This is not the same interface as the CUDA path. It imports from src.model_mlx and calls load_model_and_tokenizer(repo_id) followed by mlx_generate(model, prompt_tokens, tokenizer.eos_token_id, max_tokens=128), which yields tokens one at a time rather than returning a full output tensor. The example uses the 1.7B checkpoint and encodes the prompt with tokenizer.encode directly instead of going through apply_chat_template, so the MLX path in the README does not show chat formatting. Whether the MLX implementation carries the same lossless guarantee is not stated. The README presents it under "Further Support" without repeating the strict-lossless language, and the pinned mlx and mlx-lm versions suggest the path is version-sensitive. If you are on a Mac and expect parity with the CUDA path, treat that as unverified.

What the README does not settle: no releases, no serving integration, no independent numbers

The repository has no releases retrieved, which means there is no tagged version to pin. Installing with uv pip install -e . pulls whatever is on main at that moment, and a framework that patches generation behavior inside transformers is exactly the kind of code where a mid-week commit can change output. The README states that native vLLM and SGLang integration is coming soon, which is a plain admission that there is no production serving path today. Everything in the performance section (the 4.25x to 5.36x model zoo averages, the up to 7.8x figure, the 40K context comparison against DFlash, the MATH-500 throughput plot against Fast-dLLM-v2) comes from the project's own assets and is not reproduced here. The lossless claim is the one that deserves the most scrutiny, because it is a distributional claim and the README does not describe the consensus mechanism in enough detail to reason about it from the text alone. The paper is cited as arXiv 2605.12825, so the algorithm details presumably live there rather than in the README. The practical failure mode is also mundane: if flash-attn will not build on your CUDA version, you fall back to sdpa or eager, and the README gives no throughput expectation for those fallbacks.

Orthrus versus speculative decoding: shared cache instead of a second model

The closest alternative in the README's own framing is speculative decoding, and specifically EAGLE-3 and DFlash. The difference in approach is structural. Speculative decoding runs a smaller draft model to propose tokens and the full model to verify them, which means two sets of weights and two KV caches resident at once. Orthrus instead adds a diffusion view inside the same model and has both views attend to one cache, training only about 16% of parameters on top of a frozen backbone. The README claims this produces higher token acceptance rates and better long-context throughput, and shows a chart of average verified tokens per forward pass against EAGLE-3 and DFlash. If your deployment is memory-bound rather than compute-bound, that structural difference is the whole argument. If your deployment already has a well-tuned draft model and spare VRAM, the case is weaker, and the README offers no head-to-head numbers on identical hardware. The second alternative is the diffusion LLM family itself, represented by Fast-dLLM-v2 in the MATH-500 figure. There the trade is fidelity: the README says those adaptations lose accuracy on reasoning while Orthrus does not, which is the claim to test on your own task rather than accept.

Licence, maintenance cost and the upgrade surface

The repository is MIT-licensed, which is permissive and imposes no copyleft obligation on your own code. That covers the code in this repository. It does not automatically cover the model checkpoints, which are hosted on HuggingFace under chiennv/Orthrus-Qwen3-1.7B, 4B and 8B, and it does not cover the Qwen3 base weights those checkpoints derive from. Check the licence on each HuggingFace model card before commercial use; the README does not state one. Maintenance cost is hard to estimate from the available material. There is no release cadence to read, the last push is 2026-08-12, and the MLX path pins specific versions (mlx==0.31.2, mlx-lm==0.31.3) that will drift as those libraries move. The custom generation code runs under trust_remote_code=True, so a transformers upgrade is a potential breaking change with no version boundary to hold at. Budget for pinning your own fork rather than tracking main.

Editorial conclusion

Adopt Orthrus if you are already running Qwen3-1.7B, 4B or 8B checkpoints and you want to test whether parallel token generation holds up on your own prompts without changing the output distribution. Do not adopt it if you need a stable serving stack: there is no release, no version pin, and the README says vLLM and SGLang integration is still coming. Before committing, verify three things on your hardware: that the flash-attn build succeeds, that use_diffusion_mode=True reproduces the base model's greedy output on a held-out set, and that the 40K context throughput claim survives your batch shape.

Official sources

  1. chiennv2000/orthrus on GitHub
  2. Issues
  3. License: MIT
  4. README
Community notes

Community notes