Instructions to use olka-fi/Ornith-1.0-35B-MXFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use olka-fi/Ornith-1.0-35B-MXFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="olka-fi/Ornith-1.0-35B-MXFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("olka-fi/Ornith-1.0-35B-MXFP4") model = AutoModelForMultimodalLM.from_pretrained("olka-fi/Ornith-1.0-35B-MXFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use olka-fi/Ornith-1.0-35B-MXFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "olka-fi/Ornith-1.0-35B-MXFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "olka-fi/Ornith-1.0-35B-MXFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/olka-fi/Ornith-1.0-35B-MXFP4
- SGLang
How to use olka-fi/Ornith-1.0-35B-MXFP4 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 "olka-fi/Ornith-1.0-35B-MXFP4" \ --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": "olka-fi/Ornith-1.0-35B-MXFP4", "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 "olka-fi/Ornith-1.0-35B-MXFP4" \ --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": "olka-fi/Ornith-1.0-35B-MXFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use olka-fi/Ornith-1.0-35B-MXFP4 with Docker Model Runner:
docker model run hf.co/olka-fi/Ornith-1.0-35B-MXFP4
Ornith-1.0-35B — MXFP4 (mixed precision)
A 4-bit MXFP4 quantization of Ornith-1.0-35B, produced with qstream. Only the routed MoE experts (~95% of the weights) are quantized to MXFP4; everything quality-sensitive — including the always-on shared expert — stays BF16, bit-identical to the source.
The original model card follows in full below.
| Size | 22.9 GB (21.3 GiB weights), down from 70 GB BF16 source (33%, −67%) |
| Format | compressed-tensors mxfp4-pack-quantized — per-expert, FP4 E2M1, group-32 e8m0 scales, symmetric |
| Base | 35B-A3B MoE · 256 experts (top-8) + 1 shared · hybrid attention (30 linear-attention / 10 full-attention) · 40 layers · 262 K context · vision encoder · post-trained on Qwen 3.5 for agentic coding |
What is quantized
| Component | Precision | Why |
|---|---|---|
Routed experts (*mlp.experts.*proj.weight) |
MXFP4 (4-bit) | ~95% of the weights, sparsely activated (top-8/256) — the only place worth the size win |
Shared expert (*shared_expert.*proj.weight) |
BF16 | dense, runs on every token — quantizing it cost ~half the PPL loss for <1% size, so kept lossless (see below) |
| Full + linear (SSM) attention, router gates | BF16 | sensitive / per-token — kept lossless from the source |
| Vision encoder + projector | BF16 | image path bit-identical to base |
| Embeddings, lm_head, norms | BF16 | unchanged |
The config.json ignore list (720 entries) names every BF16 module, so vLLM never expects
packed weights for the shared expert, attention, the Gated-DeltaNet SSM layers, the vision
tower, or the routers.
Quality & faithfulness
We report deterministic, reproducible faithfulness metrics rather than noisy small-sample downstream task scores.
| Metric | Result | What it shows |
|---|---|---|
| WikiText-2 perplexity (test, 296 547 tokens) | 7.6949 → 7.7675 (+0.94%) | language modeling intact — a broken quant lands in the hundreds |
| Routed-expert SQNR (median, MXFP4 vs BF16) | ≈ 18.7 dB (16.8–19.4 dB across all 30 720 routed-expert tensors) | reconstruction error is just the unavoidable 4-bit rounding |
Why this is enough to trust the checkpoint:
- Only the routed-expert FFN weights changed. ~95% of the weights are re-quantized to MXFP4; everything else is bit-identical BF16 to the source. The model is the base model except for 4-bit rounding on the routed-expert GEMMs.
- +0.94% perplexity on the full WikiText-2 test set is well inside production-grade territory (a broken quant lands in the hundreds). The sensitive token-mixing (full + linear attention), the shared expert, routing, and vision paths are untouched.
- Keeping the shared expert in BF16 matters. Quantizing it too lands at 7.8563 (+2.10%) —
i.e. that one dense, always-on FFN (<1% of weights,
0.2 GB) accounts for **half** the total degradation, because its error hits every token at every layer. Excluding it more than halves the PPL loss for a negligible size cost. - The rounding error is diffuse, not concentrated. Across the 30 720 quantized routed-expert tensors the per-tensor SQNR sits in a tight ~18.7 dB band, and the worst 10% of tensors account for only ~10.6% of total error — no degenerate hotspots, just uniform 4-bit rounding.
PPL is measured over vLLM prompt_logprobs (evals/eval_ppl.py); SQNR via qstream-analyze
(weight reconstruction, MXFP4 dequant vs the BF16 source).
Fidelity, footprint & provenance
- Vision is untouched: the vision encoder + projector stay BF16 (bit-identical), so image capability equals the base model.
- No MTP / speculative decoding:
config.jsondeclaresmtp_num_hidden_layers: 1, but the base release ships no MTP head weights (confirmed by the upstream authors), so multi-token speculative decoding is not available with this checkpoint. Nothing MTP-related was added here. - Footprint: ~21.3 GiB of weights; fits a single ≥32 GB GPU (KV cache + vision on top).
- Provenance: built with qstream
@a06edbffrom thedeepreinforce-ai/Ornith-1.0-35BBF16 release; mixed-precision recipe (routed experts → MXFP4, shared expert + everything else → BF16).
Serving with vLLM
Verified on vllm/vllm-openai:latest-cu130 (vLLM 0.20.0, torch 2.11 + CUDA 13.0). vLLM
detects the compressed-tensors config automatically and runs the MXFP4 MoE through its
MarlinExperts kernel. On Blackwell this is weight-only FP4 (W4A16): the 4-bit weights
are dequantized and the matmul runs in BF16 — full memory savings, lossless activations.
docker run --gpus all --ipc=host -p 8000:8000 \
vllm/vllm-openai:latest-cu130 \
--model olka-fi/Ornith-1.0-35B-MXFP4 \
--gpu-memory-utilization 0.9 \
--trust-remote-code
The architecture (Qwen3_5MoeForConditionalGeneration) is registered natively in
vLLM ≥ 0.20.0 — no fork or runtime patch required.
How it was made
qstream-quantize \
--model_dir <deepreinforce-ai/Ornith-1.0-35B> \
--output_dir ./Ornith-1.0-35B-MXFP4 \
--include_layers '*mlp.experts.*proj.weight' \
--device cuda --workers 8
The allowlist is routed experts only. The shared expert is intentionally left out so it passes through as BF16 — see the faithfulness note above on why that nearly halves PPL loss.
qstream auto-detects the BF16 source, quantizes only the included routed-expert FFN
weights to MXFP4, passes the BF16 remainder through unchanged, and writes the
mixed-precision config.json. --include_layers is an allowlist: anything not matched
(the shared expert, attention, SSM, vision, routers, embeddings) is guaranteed to pass
through untouched.
License
Inherits the MIT license from the base model. This is a derivative (quantized) work of Ornith-1.0-35B.
Original model card
Ornith-1.0-35B
Aloha! 🌺 Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding.
Highlights:
- State-of-the-Art Coding Agents: Available in 9B-Dense, 31B-Dense, 35B-MoE, and 397B-MoE (post-trained on top of Gemma 4 and Qwen 3.5), achieving state-of-the-art performance among open-source models of comparable size on coding benchmarks such as Terminal-Bench 2.1, SWE-Bench, NL2Repo and OpenClaw.
- Self-Improving Training Framework: Ornith-1.0 employs RL to learn to generate not only solution rollouts, but also the scallfold that drive those rollouts. By jointly optimizing the scaffold and the resulting solution, the model discovers better search trajectories and generates higher-quality solutions.
- Licence: MIT licensed, globally accessible, and free from regional limitations.
Ornith 1.0 35B
This model card documents Ornith-1.0-35B, the lightweight member of the Ornith family, designed for efficient single-GPU deployment.
Benchmarks
| Ornith-1.0-35B | Qwen3.5-35B | Qwen3.6-35B | Gemma4-31B | Qwen3.5-397B | |
|---|---|---|---|---|---|
| Agentic Coding | |||||
| Terminal-Bench 2.1 (Terminus-2) | 64.2 | 41.4 | 52.5 | 42.1 | 53.5 |
| Terminal-Bench 2.1 (Claude Code) | 62.8 | 38.9 | 49.2 | - | 48.6 |
| SWE-bench Verified | 75.6 | 70 | 73.4 | 52 | 76.4 |
| SWE-bench Pro | 50.4 | 44.6 | 49.5 | 35.7 | 51.6 |
| SWE-bench Multilingual | 69.3 | 60.3 | 67.2 | 51.7 | 69.3 |
| NL2Repo | 34.6 | 20.5 | 29.4 | 15.5 | 36.8 |
| Claw-eval Avg | 69.8 | 65.4 | 68.7 | 48.5 | 70.7 |
| SWE Atlas - QnA | 37.1 | 13.2 | 15.5 | - | 20.4 |
| SWE Atlas - RF | 29.7 | 10.2 | 11.4 | - | 18.4 |
| SWE Atlas - TW | 27.8 | 9.8 | 13.3 | - | 18.5 |
* Terminal-Bench 2.1 (Terminus-2): We evaluate Terminal-Bench 2.1 using the Harbor/Terminus-2 framework with parser=json, temperature=1.0, top_p=1.0, and a 128K context window. Each run uses a 4-hour timeout with 32 CPU cores and 48GB RAM, and results are averaged over 5 runs. We adjust the Qwen chat template to ensure consistency between training and inference (https://huggingface.co/deepreinforce-ai/Ornith-1.0-397B/blob/main/chat_template.jinja), and modify Harbor to align with vLLM's reasoning_content key.
* Terminal-Bench 2.1 (Claude Code): We evaluate Terminal-Bench 2.1 using Claude Code 2.1.126 with parser=json, temperature=1.0, top_p=1.0, max_new_tokens=131072. Results are averaged over 5 runs. Again, Qwen chat template needs to be modified.
* SWE-Bench Verified, Pro and Multilingual: using OpenHands harness with temp=1.0, top_p=0.95, 256k context window.
* SWE Atlas QnA, RF, TW: using mini SWE agent harness with temp=1.0, top_p=0.95, 128K context window. Results are averaged over 5 runs.
* NL2Repo: with temperature=1.0, top_p=1.0, 400K context, 48K output and anti-hacking filters.
* ClawEval: An agentic code benchmark over real-user task distributions; temp=0.6 and 256K context.
Quickstart
Ornith-1.0-35B is a reasoning model: by default the assistant turn opens with a <think> … </think> block before the final answer. The serving recipes below enable a reasoning parser so the chain-of-thought is returned in a separate reasoning_content field, and a tool-call parser so the model's <tool_call> blocks are surfaced as OpenAI-style tool_calls.
Serving Ornith-1.0-35B requires recent runtimes:
- Transformers ≥ 5.8.1
- vLLM ≥ 0.19.1
- SGLang ≥ 0.5.9
Serving Ornith-1.0-35B
The two recipes below stand up an OpenAI-compatible server on a single 8×80GB GPU node (tensor-parallel 8). Adjust --tensor-parallel-size / --tp to the number of GPUs you have.
vLLM
vllm serve deepreinforce-ai/Ornith-1.0-35B \
--served-model-name Ornith-1.0-35B \
--tensor-parallel-size 8 \
--host 0.0.0.0 --port 8000 \
--max-model-len 262144 \
--gpu-memory-utilization 0.90 \
--enable-prefix-caching \
--enable-auto-tool-choice --tool-call-parser qwen3_xml \
--reasoning-parser qwen3 \
--trust-remote-code
SGLang
python -m sglang.launch_server \
--model-path deepreinforce-ai/Ornith-1.0-35B \
--served-model-name Ornith-1.0-35B \
--tp 8 \
--host 0.0.0.0 --port 8000 \
--context-length 262144 \
--mem-fraction-static 0.85 \
--tool-call-parser qwen3_coder \
--reasoning-parser qwen3
Hugging Face Transformers
For a quick local test (or to script offline generation), load the model directly with Transformers. Make sure you have a recent release installed — see the Transformers installation guide; Ornith-1.0-35B requires transformers >= 5.8.1.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "deepreinforce-ai/Ornith-1.0-35B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
dtype="auto",
device_map="auto",
)
messages = [
{"role": "user", "content": "Write a Python function is_prime(n). Keep it short."}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
generated = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.6,
top_p=0.95,
top_k=20,
)
output_ids = generated[0][inputs.input_ids.shape[1]:]
# The reply contains a <think> ... </think> reasoning block followed by the answer.
content = tokenizer.decode(output_ids, skip_special_tokens=True)
print(content)
To split the reasoning trace from the final answer, parse on the </think> marker:
text = tokenizer.decode(output_ids, skip_special_tokens=True)
if "</think>" in text:
reasoning, answer = text.split("</think>", 1)
reasoning = reasoning.replace("<think>", "").strip()
answer = answer.strip()
else:
reasoning, answer = "", text.strip()
Using Ornith-1.0-35B via the Chat Completions API
Once a vLLM or SGLang server is running, talk to it with any OpenAI-compatible client.
Basic Usage
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="EMPTY", # any non-empty string works for a local server
)
response = client.chat.completions.create(
model="Ornith-1.0-35B",
messages=[
{"role": "user", "content": "Write a one-line Python lambda that squares a number."}
],
temperature=0.6,
top_p=0.95,
max_tokens=1024,
)
message = response.choices[0].message
# reasoning_content holds the <think> trace; content holds the final answer.
print("reasoning:", getattr(message, "reasoning_content", None))
print("answer:", message.content)
You can also stream tokens, or hand the model tools — Ornith-1.0-35B emits well-formed function calls that the server parses into the standard tool_calls field:
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"],
},
},
}
]
response = client.chat.completions.create(
model="Ornith-1.0-35B",
messages=[{"role": "user", "content": "What is the weather in Paris right now?"}],
tools=tools,
tool_choice="auto",
temperature=0.6,
max_tokens=2048,
)
tool_call = response.choices[0].message.tool_calls[0]
print(tool_call.function.name, tool_call.function.arguments)
# -> get_weather {"city": "Paris"}
You can point any OpenAI-compatible SDK (Python, Node.js, etc.) or curl at the same /v1/chat/completions endpoint.
Agentic Usage
Ornith-1.0-35B excels in tool-calling and agentic coding capabilities.
Agent Frameworks
Because Ornith-1.0-35B exposes an OpenAI-compatible endpoint with tool calling, it works out of the box with standard agent frameworks. Below is a minimal example that connects Ornith-1.0-35B to tools through an MCP server.
import os
from openai import OpenAI
client = OpenAI(
base_url=os.getenv("OPENAI_BASE_URL", "http://localhost:8000/v1"),
api_key=os.getenv("OPENAI_API_KEY", "EMPTY"),
)
tools = [
{
"type": "function",
"function": {
"name": "run_shell",
"description": "Run a shell command and return its output.",
"parameters": {
"type": "object",
"properties": {
"command": {"type": "string", "description": "The command to run"}
},
"required": ["command"],
},
},
}
]
messages = [{"role": "user", "content": "List the Python files in the current directory."}]
response = client.chat.completions.create(
model="deepreinforce-ai/Ornith-1.0-35B",
messages=messages,
tools=tools,
temperature=0.6,
top_p=0.95,
)
print(response.choices[0].message)
Examples of using Ornith with agent harness:
Hermes Agent
# Hermes talks to any OpenAI-compatible endpoint — point it at your Ornith server.
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"
export MODEL="deepreinforce-ai/Ornith-1.0-35B"
Atomic.chat/ Ollama / llama.cpp
# Both runtimes load a GGUF build of Ornith (publish one at deepreinforce-ai/Ornith-1.0-35B-GGUF).
# llama.cpp — serve an OpenAI-compatible API on port 8000.
llama-server -hf deepreinforce-ai/Ornith-1.0-35B-GGUF --port 8000 -c 262144
# Ollama — pull and chat with the same GGUF straight from Hugging Face.
ollama run hf.co/deepreinforce-ai/Ornith-1.0-35B-GGUF
OpenClaw
# OpenClaw talks to any OpenAI-compatible endpoint — point it at your Ornith server.
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"
export OPENAI_MODEL="deepreinforce-ai/Ornith-1.0-35B"
Unsloth Studio
pip install unsloth
# Load Ornith for fast local inference or fine-tuning (Python):
# from unsloth import FastLanguageModel
# model, tokenizer = FastLanguageModel.from_pretrained(
# "deepreinforce-ai/Ornith-1.0-35B",
# max_seq_length=262144,
# load_in_4bit=True,
# )
OpenHands
pip install openhands-ai
# OpenHands routes through LiteLLM; the "openai/" prefix selects the OpenAI-compatible path.
export LLM_MODEL="openai/deepreinforce-ai/Ornith-1.0-35B"
export LLM_BASE_URL="http://localhost:8000/v1"
export LLM_API_KEY="EMPTY"
# Launch the CLI (or run the official OpenHands Docker image with the same env vars).
openhands
Coding CLIs
Ornith-1.0-35B is optimized for terminal-based coding agents. Point any OpenAI-compatible coding CLI at your Ornith-1.0-35B endpoint (set OPENAI_BASE_URL and OPENAI_API_KEY) to understand large codebases, automate tedious work, and ship faster.
OpenCode
# Register your local Ornith endpoint as a provider in ~/.config/opencode/opencode.json:
#
# {
# "$schema": "https://opencode.ai/config.json",
# "provider": {
# "ornith": {
# "npm": "@ai-sdk/openai-compatible",
# "name": "Ornith (local)",
# "options": { "baseURL": "http://localhost:8000/v1", "apiKey": "EMPTY" },
# "models": { "deepreinforce-ai/Ornith-1.0-35B": { "name": "Ornith-1.0-35B" } }
# }
# }
# }
opencode
Citation
If you find our work helpful, feel free to give us a cite.
@misc{ornith-35b,
title = {{Ornith-1.0-35B}: Agentic Coding, Open to All},
url = {https://deep-reinforce.com/ornith_1_0.html},
author = {{DeepReinforce Team}},
year = {2026}
}
- Downloads last month
- 7,295
Model tree for olka-fi/Ornith-1.0-35B-MXFP4
Base model
deepreinforce-ai/Ornith-1.0-35B