Ornith-1.0 是专为 Agent 编码优化的开源模型,支持自我迭代改进,在 HN 获 262 个赞,适合需要代码生成自动化的开发者。
Aloha!🌺 Ornith-1.0 是一系列能够自我改进的开源 Agentic Coding 模型。
业界领先的编程 Agent:提供 9B-Dense、31B-Dense、35B-MoE 和 397B-MoE 版本(基于 Gemma 4 和 Qwen 3.5 进行后训练),在 Terminal-Bench 2.1、SWE-Bench、NL2Repo 和 OpenClaw 等编程基准测试中,其性能在同等规模的开源模型中达到业界领先水平。
自我改进训练框架:Ornith-1.0 使用 RL,不仅学习生成解决方案的 rollout,还会学习生成驱动这些 rollout 的 scaffold。通过联合优化 scaffold 及其产出的解决方案,模型能够发现更优的搜索轨迹,并生成质量更高的解决方案。
许可证:采用 MIT 许可证,全球均可访问,不受地区限制。
每个模型都会与适合其规模的基线模型进行比较评估。所有三个模型均使用相同的测试 harness 和解码配置(详见表格下方的说明)。
parser=json、temperature=1.0、top_p=1.0,上下文窗口为 128K。每次运行的超时时间为 4 小时,配备 32 个 CPU 核心和 48GB RAM,最终结果取 5 次运行的平均值。我们调整了 Qwen chat template,以确保训练与推理保持一致,并修改 Harbor,使其与 vLLM 的 reasoning_content key 对齐。parser=json、temperature=1.0、top_p=1.0、max_new_tokens=131072,最终结果取 5 次运行的平均值(同样修改了 Qwen chat template)。temp=1.0、top_p=0.95,上下文窗口为 256K。temp=1.0、top_p=0.95,上下文窗口为 128K,最终结果取 5 次运行的平均值。temperature=1.0、top_p=1.0,上下文为 400K,输出为 48K,并启用 anti-hacking filters。temp=0.6,上下文为 256K。Ornith-1.0 是一个 reasoning model:默认情况下,assistant turn 会先输出一个 <think> … </think> 块,然后再给出最终答案。下面的部署方案会启用 reasoning parser,将 chain-of-thought 放在单独的 reasoning_content 字段中返回;同时启用 tool-call parser,将模型输出的 <tool_call> 块转换为 OpenAI 风格的 tool_calls。
部署 Ornith-1.0 需要使用较新的 runtime:
推荐的采样参数:temperature=0.6、top_p=0.95、top_k=20(如需复现公布的基准测试配置,请使用 temperature=1.0)。
Ornith-1.0 提供一个 9B dense 模型,以及两个 Mixture-of-Experts 模型(35B、397B)。所有 checkpoint 均暴露相同的 OpenAI-compatible interface,并支持 256K(262,144 token)上下文窗口;9B dense 模型可以装入单张 80GB GPU,而 MoE checkpoint 则通过 tensor parallelism 分片部署在多 GPU 节点上。每种规模均提供多种精度和格式版本:
下面的配置方案会以统一别名 Ornith-1.0 启动一个 OpenAI-compatible server。请将 MODEL 设置为你想使用的 checkpoint,并让 --tensor-parallel-size / --tp 与 GPU 数量保持一致。
# Pick a checkpoint — dense 9B, or MoE 35B / 397B (append -FP8 for lower-VRAM serving):
MODEL=deepreinforce-ai/Ornith-1.0-397B
# MoE checkpoints (35B / 397B): shard across the node with tensor parallelism.
# Dense checkpoint (9B): fits on a single 80GB GPU — drop --tensor-parallel-size.
vllm serve $MODEL \
--served-model-name Ornith-1.0 \
--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
# Pick a checkpoint — dense 9B, or MoE 35B / 397B (append -FP8 for lower-VRAM serving):
MODEL=deepreinforce-ai/Ornith-1.0-397B
# MoE checkpoints (35B / 397B): shard with --tp ; dense 9B: drop --tp for a single GPU.
python -m sglang.launch_server \
--model-path $MODEL \
--served-model-name Ornith-1.0 \
--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
如果想快速进行本地测试,或编写离线生成脚本,可以直接使用 Transformers 加载模型。请确保已经安装较新的版本——参见 Transformers 安装指南;Ornith-1.0 要求 transformers >= 5.8.1。9B dense checkpoint 最适合在本地运行。
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "deepreinforce-ai/Ornith-1.0-9B" # or -35B / -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]:]
# The reply contains a <think> ... </think> reasoning block followed by the answer.
content = tokenizer.decode(output_ids, skip_special_tokens=True)
print(content)
如需将 reasoning trace 与最终答案拆分,可以根据 </think> 标记进行解析:
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()
启动 vLLM 或 SGLang server 后,即可使用任何 OpenAI-compatible client 与其交互。
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",
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)
你也可以流式接收 token,或者为模型提供工具——Ornith-1.0 能够生成格式规范的 function call,server 会将其解析到标准的 tool_calls 字段中:
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",
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"}
任何 OpenAI-compatible SDK(Python、Node.js 等)或 curl,都可以连接到同一个 /v1/chat/completions endpoint。
Ornith-1.0 在 tool-calling 和 Agentic Coding 能力方面表现出色。
由于 Ornith-1.0 提供了支持 tool calling 的 OpenAI-compatible endpoint,因此可以开箱即用地接入标准 Agent framework。下面是一个最小示例,展示如何通过 MCP server 将 Ornith-1.0 连接到工具。
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="Ornith-1.0",
messages=messages,
tools=tools,
temperature=0.6,
top_p=0.95,
)
print(response.choices[0].message)
以下是通过 Agent harness 使用 Ornith 的示例:
# 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="Ornith-1.0"
pip install openhands-ai
# OpenHands routes through LiteLLM; the "openai/" prefix selects the OpenAI-compatible path.
export LLM_MODEL="openai/Ornith-1.0"
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
# Both runtimes load a GGUF build — available for the 9B and 35B checkpoints (swap -9B for -35B).
# llama.cpp — serve an OpenAI-compatible API on port 8000.
llama-server -hf deepreinforce-ai/Ornith-1.0-9B-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-9B-GGUF
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-9B",
# max_seq_length=262144,
# load_in_4bit=True,
# )
# 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="Ornith-1.0"
Ornith-1.0 针对终端式编程 Agent 进行了优化。将任何 OpenAI-compatible coding CLI 指向你的 Ornith-1.0 endpoint(设置 OPENAI_BASE_URL 和 OPENAI_API_KEY),即可理解大型代码库、自动完成繁琐工作,更快交付成果。
# 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": { "Ornith-1.0": { "name": "Ornith-1.0" } }
# }
# }
# }
opencode
如果你觉得我们的工作有所帮助,欢迎引用。
@misc{ornith-1.0,
title = {{Ornith-1.0}: Agentic Coding, Open to All},
url = {https://deep-reinforce.com/ornith_1_0.html},
author = {{DeepReinforce Team}},
year = {2026}
}