Text Generation
Transformers
Safetensors
ouro
looped-language-model
reasoning
recurrent-depth
thinking
chain-of-thought
conversational
custom_code
Instructions to use ByteDance/Ouro-1.4B-Thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ByteDance/Ouro-1.4B-Thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ByteDance/Ouro-1.4B-Thinking", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ByteDance/Ouro-1.4B-Thinking", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ByteDance/Ouro-1.4B-Thinking 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-Thinking" # 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-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ByteDance/Ouro-1.4B-Thinking
- SGLang
How to use ByteDance/Ouro-1.4B-Thinking 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-Thinking" \ --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-Thinking", "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-Thinking" \ --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-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ByteDance/Ouro-1.4B-Thinking with Docker Model Runner:
docker model run hf.co/ByteDance/Ouro-1.4B-Thinking
Commit History
-
Fix default RoPE init function reference in OuroRotaryEmbedding (#6)
- Fix default RoPE init function reference in OuroRotaryEmbedding (934f16998719753da7602b303f9b1d6326fd8060) Co-authored-by: WangYi <wanglne@users.noreply.huggingface.co>3aaa222
-
Update rope embeddings for rope_type='default' (#3)
- Update rope embeddings for rope_type='default' (14dd022f7d4c56432fb81ee53466c3acf657b3ee) Co-authored-by: Petrov <sirorezka@users.noreply.huggingface.co>697afdd -
Fix bos/eos token IDs + add enable_thinking to chat template (#4)
- Fix bos/eos token IDs + add enable_thinking to chat template (8f196b8acc5e178c889318e0a45c274420dc5619) Co-authored-by: Kristian Shw <KristianS7@users.noreply.huggingface.co>b80c817 -
Fix UniversalTransformerCache.get_mask_sizes for batched generation (#5)
- Fix UniversalTransformerCache.get_mask_sizes for batched generation (68d9e11eeb054b2ffa887888b67cf434b870b5f5) Co-authored-by: Kristian Shw <KristianS7@users.noreply.huggingface.co>cadaf69
-
fix EOS/BOS
Verified signature9b5b209
-
Update modeling_ouro.py
Verified signature7270312 -
Update README.md
Verified signature9d2ad6e
-
Improve model card: Update paper/code links and BibTeX citation (#1)
Verified signature- Improve model card: Update paper/code links and BibTeX citation (2a53da4b62c7fd361865b37b02b09c250b26eaf1) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>a5728bf
-
Upload folder using huggingface_hub
Verified signaturee96b530
-
Update README.md
Verified signaturebce91fc -
Upload folder using huggingface_hub
Verified signature449f321 -
initial commit
Verified signature572c6ad