What is quantized
Table with columns: Component, Precision, Why| Component | Precision | Why |
|---|
Routed experts (*mlp.experts.*proj) | MXFP4 (4-bit) | ~95% of the weights, sparsely activated (top-10/512) — the only place worth the size win |
Shared expert (*shared_expert.*) | BF16 | dense, runs on every token — quantizing it roughly doubles PPL loss for <1% size, so kept lossless |
| 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 source ships the routed experts as fused 3D tensors (experts.gate_up_proj [512, 2048, 4096]);
qstream splits them into per-expert 2D MXFP4 tensors that stock vLLM consumes. The config.json
ignore list (995 entries) names every BF16 module.
Quality & faithfulness
Table with columns: Metric, Result, What it shows| Metric | Result | What it shows |
|---|
| WikiText-2 perplexity (test, 296 547 tokens) | 5.21 | language modeling intact — a broken quant lands in the hundreds |
| GSM8K (40-task sample, CoT) | 39/40 (97.5%) | math/reasoning preserved (the 1 miss was length-truncated, not wrong reasoning) |
| Routed-expert SQNR (sampled, MXFP4 vs BF16) | ≈ 19.0 dB (18.0–19.6 dB; 60 tensors across 5 layers × 4 experts × 3 proj) | reconstruction error is just the unavoidable 4-bit rounding |
- 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.
- Functional evals run on a single 268 GB GPU (NVIDIA B300): PPL 5.21 (well below the
35B sibling's 7.77, as expected for a far
larger model) and near-perfect GSM8K confirm the quant is coherent end-to-end.
- SQNR ≈ 19 dB matches the 35B sibling (18.7 dB, where it corresponded to +0.94% WikiText-2
perplexity), and confirms the fused→per-expert split is correct (a wrong split would collapse
SQNR toward 0 dB).
Serving with vLLM
The architecture (Qwen3_5MoeForConditionalGeneration) is registered natively in vLLM ≥ 0.20.0.
At 225 GB it fits a single large-VRAM GPU (e.g. NVIDIA B300, 268 GB — verified) or
multi-GPU tensor parallelism (e.g. 4× 80 GB). Single-GPU:
vllm serve olka-fi/Ornith-1.0-397B-MXFP4 \
--max-model-len 8192 --gpu-memory-utilization 0.92 --max-num-seqs 128 \
--load-format fastsafetensors --trust-remote-code
# multi-GPU: add --tensor-parallel-size N (and drop --max-num-seqs if VRAM is ample)
# image: vllm/vllm-openai:latest-cu130 (vLLM 0.20.0, CUDA 13.0) verified for the arch
On Blackwell the MXFP4 MoE runs through vLLM's MarlinExperts kernel as weight-only FP4 (W4A16):
4-bit weights dequantized, matmul in BF16 — full memory savings, lossless activations.
Note: config.json declares mtp_num_hidden_layers: 1, but the base release ships no MTP
head weights, so multi-token speculative decoding is not available with this checkpoint.
How it was made
qstream-quantize \
--model_dir <deepreinforce-ai/Ornith-1.0-397B> \
--output_dir ./Ornith-1.0-397B-MXFP4 \
--include_layers '*mlp.experts.*proj' \
--device cuda --workers 6
--include_layers is an allowlist (routed experts only); the shared expert, attention, SSM,
vision, routers, and embeddings all pass through as BF16.
License
Inherits the MIT license from the base model. This is a derivative (quantized) work of
Ornith-1.0-397B.
Original model card

Ornith-1.0-397B
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 397B
This model card documents Ornith-1.0-397B, the lightweight member of the Ornith family, designed for efficient single-GPU deployment.
Benchmarks
Quickstart
Serving Ornith-1.0-397B
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-397B \
--served-model-name Ornith-1.0-397B \
--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-397B \
--served-model-name Ornith-1.0-397B \
--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
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-397B requires transformers >= 5.8.1.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "deepreinforce-ai/Ornith-1.0-397B"
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]:]
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-397B 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",
)
response = client.chat.completions.create(
model="Ornith-1.0-397B",
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
print("reasoning:", getattr(message, "reasoning_content", None))
print("answer:", message.content)
You can also stream tokens, or hand the model tools — Ornith-1.0-397B 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-397B",
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)
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-397B excels in tool-calling and agentic coding capabilities.
Agent Frameworks
Because Ornith-1.0-397B 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-397B 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-397B",
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-397B"
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-397B"
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-397B",
# 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-397B"
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-397B is optimized for terminal-based coding agents. Point any OpenAI-compatible coding CLI at your Ornith-1.0-397B 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-397B": { "name": "Ornith-1.0-397B" } }
# }
# }
# }
opencode
Citation
If you find our work helpful, feel free to give us a cite.
@misc{ornith_397b,
title = {{Ornith-1.0-397B}: Agentic Coding, Open to All},
url = {https://deep-reinforce.com/ornith_1_0.html},
author = {{DeepReinforce Team}},
year = {2026}
}