Text Generation
Transformers
Safetensors
qwen3
diffusion
parallel-decoding
orthrus
conversational
custom_code
text-generation-inference
Instructions to use chiennv/Orthrus-Qwen3-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chiennv/Orthrus-Qwen3-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chiennv/Orthrus-Qwen3-4B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("chiennv/Orthrus-Qwen3-4B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("chiennv/Orthrus-Qwen3-4B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use chiennv/Orthrus-Qwen3-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chiennv/Orthrus-Qwen3-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chiennv/Orthrus-Qwen3-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chiennv/Orthrus-Qwen3-4B
- SGLang
How to use chiennv/Orthrus-Qwen3-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "chiennv/Orthrus-Qwen3-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chiennv/Orthrus-Qwen3-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "chiennv/Orthrus-Qwen3-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chiennv/Orthrus-Qwen3-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use chiennv/Orthrus-Qwen3-4B with Docker Model Runner:
docker model run hf.co/chiennv/Orthrus-Qwen3-4B
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ pipeline_tag: text-generation
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# Orthrus-Qwen3-4B
|
| 14 |
-
[**Paper**](https://arxiv.org) | [**GitHub**](https://github.com/chiennv2000/orthrus)
|
| 15 |
|
| 16 |
**Orthrus** is a simple and efficient dual-architecture framework that unifies the exact generation fidelity of autoregressive Large Language Models (LLMs) with the high-speed parallel token generation of diffusion models. By augmenting a frozen pre-trained LLM with a lightweight, trainable diffusion module, Orthrus delivers significantly accelerated inference without sacrificing output quality.
|
| 17 |
|
|
@@ -77,4 +77,17 @@ output_ids = model.generate(
|
|
| 77 |
```
|
| 78 |
|
| 79 |
## Citation
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# Orthrus-Qwen3-4B
|
| 14 |
+
[**Paper**](https://arxiv.org/abs/2605.12825) | [**GitHub**](https://github.com/chiennv2000/orthrus)
|
| 15 |
|
| 16 |
**Orthrus** is a simple and efficient dual-architecture framework that unifies the exact generation fidelity of autoregressive Large Language Models (LLMs) with the high-speed parallel token generation of diffusion models. By augmenting a frozen pre-trained LLM with a lightweight, trainable diffusion module, Orthrus delivers significantly accelerated inference without sacrificing output quality.
|
| 17 |
|
|
|
|
| 77 |
```
|
| 78 |
|
| 79 |
## Citation
|
| 80 |
+
|
| 81 |
+
If you find this model or architecture useful in your work, please cite the original paper:
|
| 82 |
+
|
| 83 |
+
```bibtex
|
| 84 |
+
@misc{vannguyen2026orthrusmemoryefficientparalleltoken,
|
| 85 |
+
title={Orthrus: Memory-Efficient Parallel Token Generation via Dual-View Diffusion},
|
| 86 |
+
author={Chien Van Nguyen and Chaitra Hegde and Van Cuong Pham and Ryan A. Rossi and Franck Dernoncourt and Thien Huu Nguyen},
|
| 87 |
+
year={2026},
|
| 88 |
+
eprint={2605.12825},
|
| 89 |
+
archivePrefix={arXiv},
|
| 90 |
+
primaryClass={cs.LG},
|
| 91 |
+
url={https://arxiv.org/abs/2605.12825},
|
| 92 |
+
}
|
| 93 |
+
```
|