Text Generation
Transformers
Safetensors
ouro
looped-language-model
reasoning
recurrent-depth
conversational
custom_code
Instructions to use ByteDance/Ouro-1.4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ByteDance/Ouro-1.4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ByteDance/Ouro-1.4B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ByteDance/Ouro-1.4B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ByteDance/Ouro-1.4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ByteDance/Ouro-1.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": "ByteDance/Ouro-1.4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ByteDance/Ouro-1.4B
- SGLang
How to use ByteDance/Ouro-1.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 "ByteDance/Ouro-1.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": "ByteDance/Ouro-1.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 "ByteDance/Ouro-1.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": "ByteDance/Ouro-1.4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ByteDance/Ouro-1.4B with Docker Model Runner:
docker model run hf.co/ByteDance/Ouro-1.4B
Update README.md
Browse files
README.md
CHANGED
|
@@ -112,17 +112,18 @@ outputs = model.generate(**inputs, max_new_tokens=100)
|
|
| 112 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 113 |
```
|
| 114 |
|
|
|
|
| 115 |
|
|
|
|
| 116 |
## Citation
|
| 117 |
|
| 118 |
```bibtex
|
| 119 |
-
@article{
|
| 120 |
title={Scaling Latent Reasoning via Looped Language Models},
|
| 121 |
-
author={Zhu, Rui-Jie and Wang, Zixuan and Hua, Kai and Zhang, Tianyu and Li, Ziniu and Que, Haoran and Wei, Boyi and
|
| 122 |
-
journal={arXiv preprint},
|
| 123 |
year={2025}
|
| 124 |
}
|
| 125 |
-
```
|
| 126 |
|
| 127 |
## License
|
| 128 |
|
|
|
|
| 112 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 113 |
```
|
| 114 |
|
| 115 |
+
## Acknowledgments
|
| 116 |
|
| 117 |
+
We thank [@Antizana](https://github.com/Antizana) for the KV cache fix merged from [ouro-cache-fix](https://github.com/Antizana/ouro-cache-fix), which resolved a critical compatibility issue with transformers>=4.56.0.
|
| 118 |
## Citation
|
| 119 |
|
| 120 |
```bibtex
|
| 121 |
+
@article{zhu2025scaling,
|
| 122 |
title={Scaling Latent Reasoning via Looped Language Models},
|
| 123 |
+
author={Zhu, Rui-Jie and Wang, Zixuan and Hua, Kai and Zhang, Tianyu and Li, Ziniu and Que, Haoran and Wei, Boyi and Wen, Zixin and Yin, Fan and Xing, He and others},
|
| 124 |
+
journal={arXiv preprint arXiv:2510.25741},
|
| 125 |
year={2025}
|
| 126 |
}
|
|
|
|
| 127 |
|
| 128 |
## License
|
| 129 |
|