deepreinforce-ai/Ornith-1.0-35B-GGUF

Hugging Face Models Trending 模型

摘要

deepreinforce-ai 发布了 Ornith-1.0-35B-GGUF,这是一个最先进的开源编程智能体模型,它使用自我改进的强化学习来联合优化框架和解决方案生成,在编程基准测试上达到了SOTA性能。

任务:text-generation 标签:transformers, gguf, text-generation, license:mit, endpoints_compatible, region:us, conversational
查看原文
查看缓存全文

缓存时间: 2026/06/26 05:21

deepreinforce-ai/Ornith-1.0-35B-GGUF · Hugging Face 来源: https://huggingface.co/deepreinforce-ai/Ornith-1.0-35B-GGUF Ornith 博客 (https://deep-reinforce.com/ornith.html) Aloha! 🌺 今天,我们发布 Ornith-1.0,这是一个自我改进的开源模型系列,专为智能体编程而设计。亮点如下:

  • 最先进的编程智能体:提供 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),还学习生成驱动这些展开的支架(scaffold)。通过联合优化支架和最终方案,模型能够发现更好的搜索轨迹,生成更高质量的解决方案。
  • 许可证:采用 MIT 许可证,全球可访问,无地区限制。

Ornith 35B 基准测试结果

https://huggingface.co/deepreinforce-ai/Ornith-1.0-35B-GGUF#ornith-10-35b

Ornith 1.0 35B

本模型卡文档记录了Ornith-1.0-35B,它是 Ornith 系列的轻量级成员,专为高效的单 GPU 部署而设计。

基准测试

任务Ornith-1.0-35BQwen3.5-35BQwen3.6-35BGemma4-31BQwen3.5-397B
智能体编程
Terminal-Bench 2.1 (Terminus-2)64.241.452.542.153.5
Terminal-Bench 2.1 (Claude Code)62.838.949.2-48.6
SWE-bench Verified75.67073.45276.4
SWE-bench Pro50.444.649.535.751.6
SWE-bench Multilingual69.360.367.251.769.3
NL2Repo34.620.529.415.536.8
Claw-eval Avg69.865.468.748.570.7
SWE Atlas - QnA37.113.215.5-20.4
SWE Atlas - RF29.710.211.4-18.4
SWE Atlas - TW27.89.813.3-18.5
  • Terminal-Bench 2.1 (Terminus-2):我们使用 Harbor/Terminus-2 框架评估 Terminal-Bench 2.1,参数为 parser=json, temperature=1.0, top_p=1.0, 上下文窗口128K。每次运行使用 4 小时超时、32个 CPU 核心和 48GB RAM,结果取 5 次运行的平均值。我们调整了 Qwen 聊天模板以确保训练和推理之间的一致性 (https://huggingface.co/deepreinforce-ai/Ornith-1.0-397B/blob/main/chat_template.jinja),并修改 Harbor 以匹配 vLLM 的 reasoning_content 键。
  • Terminal-Bench 2.1 (Claude Code):我们使用 Claude Code 2.1.126 评估 Terminal-Bench 2.1,参数为 parser=json, temperature=1.0, top_p=1.0, max_new_tokens=131072。结果取 5 次运行的平均值。同样需要修改 Qwen 聊天模板。
  • SWE-Bench Verified, Pro 和 Multilingual:使用 OpenHands harness,参数为 temp=1.0, top_p=0.95, 上下文窗口 256K。
  • SWE Atlas QnA, RF, TW:使用 mini SWE agent harness,参数为 temp=1.0, top_p=0.95, 上下文窗口 128K。结果取 5 次运行的平均值。
  • NL2Repo:参数为 temperature=1.0, top_p=1.0, 上下文 400K, 输出 48K, 并启用反黑客过滤器。
  • ClawEval:基于真实用户任务分布的智能体代码基准测试;参数为 temp=0.6, 上下文 256K。

快速入门

📝 注意 Ornith-1.0-35B 是一个推理模型:默认情况下,助手的回答会先输出一个 ... 代码块,然后才是最终答案。下面的服务配置启用了推理解析器,使得思维链在单独的 reasoning_content 字段中返回;同时启用了工具调用解析器,使模型的 `` 代码块以 OpenAI 风格的 tool_calls 形式呈现。

服务 Ornith-1.0-35B 需要较新的运行环境:

  • Transformers ≥ 5.8.1
  • vLLM ≥ 0.19.1
  • SGLang ≥ 0.5.9

服务 Ornith-1.0-35B

以下两个配置可以在一个 8×80GB GPU 节点(张量并行 8)上启动 OpenAI 兼容的服务器。请根据你拥有的 GPU 数量调整 --tensor-parallel-size / --tp 参数。

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

如需快速本地测试(或编写离线生成脚本),可直接使用 Transformers 加载模型。请确保安装了最新版本——参见 Transformers 安装指南;Ornith-1.0-35B 需要 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]:]
# 回复包含一个 ... 推理块,随后是答案。
content = tokenizer.decode(output_ids, skip_special_tokens=True)
print(content)

要拆分推理过程和最终答案,请解析 `` 标记:

text = tokenizer.decode(output_ids, skip_special_tokens=True)
if "<final_answer>" in text:
    reasoning, answer = text.split("<final_answer>", 1)
    reasoning = reasoning.replace("<reasoning>", "").strip()
    answer = answer.strip()
else:
    reasoning, answer = "", text.strip()

通过聊天补全 API 使用 Ornith-1.0-35B

一旦 vLLM 或 SGLang 服务器运行起来,可以使用任何 OpenAI 兼容的客户端与其通信。

基本用法

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8000/v1",
    api_key="EMPTY",  # 对于本地服务器,任何非空字符串都可
)

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 包含推理过程;content 包含最终答案。
print("reasoning:", getattr(message, "reasoning_content", None))
print("answer:", message.content)

你也可以流式传输 token,或者将工具交给模型——Ornith-1.0-35B 会生成格式良好的函数调用,服务器会将其解析为标准 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-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"}

你可以将任何 OpenAI 兼容的 SDK(Python、Node.js 等)或 curl 指向相同的 /v1/chat/completions 端点。

智能体用法

Ornith-1.0-35B 在工具调用和智能体编程方面表现出色。

智能体框架

由于 Ornith-1.0-35B 提供了 OpenAI 兼容的端点并支持工具调用,因此它可以与标准智能体框架开箱即用。以下是一个最小示例,通过 MCP 服务器将 Ornith-1.0-35B 连接到工具。

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)

使用 Ornith 与智能体 harness 的示例:

Hermes Agent

# Hermes 可与任何 OpenAI 兼容的端点通信——将其指向你的 Ornith 服务器。
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

# 两种运行时均可加载 Ornith 的 GGUF 构建(发布在 deepreinforce-ai/Ornith-1.0-35B-GGUF)。
# llama.cpp — 在端口 8000 上提供 OpenAI 兼容的 API。
llama-server -hf deepreinforce-ai/Ornith-1.0-35B-GGUF --port 8000 -c 262144

# Ollama — 直接从 Hugging Face 拉取并聊天。
ollama run hf.co/deepreinforce-ai/Ornith-1.0-35B-GGUF

OpenClaw

# OpenClaw 可与任何 OpenAI 兼容的端点通信——将其指向你的 Ornith 服务器。
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
# 加载 Ornith 进行快速本地推理或微调(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 通过 LiteLLM 路由;"openai/" 前缀选择 OpenAI 兼容路径。
export LLM_MODEL="openai/deepreinforce-ai/Ornith-1.0-35B"
export LLM_BASE_URL="http://localhost:8000/v1"
export LLM_API_KEY="EMPTY"
# 启动 CLI(或使用相同的环境变量运行官方 OpenHands Docker 镜像)。
openhands

编程 CLI

Ornith-1.0-35B 专为终端编程智能体进行了优化。将任何 OpenAI 兼容的编程 CLI 指向你的 Ornith-1.0-35B 端点(设置 OPENAI_BASE_URLOPENAI_API_KEY),即可理解大型代码库、自动执行繁琐工作并加速交付。

OpenCode

# 在 ~/.config/opencode/opencode.json 中注册本地 Ornith 端点作为提供者:
#
# {
#   "$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

引用

如果你觉得我们的工作有帮助,欢迎引用我们。

@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}
}

相似文章

deepreinforce-ai/Ornith-1.0-9B

Hugging Face Models Trending

deepreinforce-ai 发布了 Ornith-1.0,一个开源编码代理模型系列,在编码基准测试上实现了最先进的性能,提供从 9B 到 397B 的参数规模,采用自我改进训练框架和 MIT 许可证。