Repository navigation
Description
Overview
Ornith 1.0 9B (DeepReinforce, June 2026, MIT) passed evaluation in #1464. This issue implements the three remaining production tasks to make it a first-class catalog model.
Background: What the Experiment Found
Architecture
Ornith uses the qwen35 arch in llama.cpp — a hybrid SSM/attention model (Gated Delta Net). 24 of 32 layers are recurrent SSM; 8 are full multi-head attention (every 4th block). This gives it a unique property: generation speed is flat across context lengths — 12.0 t/s at 1k tokens, 11.9 t/s at 8k tokens. Pure-attention models degrade significantly past 4k on 16 GB hardware.
Tool-call format (Format D)
Ornith's embedded Jinja chat template defines a distinct XML-like format, different from all three formats the parser previously handled:
<tool_call>
<function=search_nodes>
<parameter=query>
Rust programming
</parameter>
</function>
</tool_call>This parser is already implemented. parse_tool_calls_xml() and parse_xml_tool_call_block() are live in packages/nlp-engine/src/chat/parser.rs. emit_oai_delta() in mod.rs intercepts content containing <tool_call> and routes it through the XML parser before the text splitter. Experiment validated 8/10 tool calls parsed correctly.
update_node miss (prompt engineering)
update_node failed both trials — the model asked for clarification instead of calling the tool. The system prompt for update_node provides placeholder node_id and content values; Ornith treats these as literally "fill in the blank" rather than examples. Fix: provide concrete dummy values in the example call.
Reasoning (<think> blocks)
Ornith produces <think>...</think> blocks in the token stream when enable_thinking: true. The thinking content contains correct multi-step planning (e.g., search_nodes → get_node × N → create_node, with correct sequencing rationale). Currently these tokens leak into the visible response. The production ChatEngine needs a <think>/</think> routing path analogous to the existing Gemma 4 ChannelSplitter to emit ChatChunk::Reasoning events.
Speed / memory
| Metric | Value |
|---|---|
| GGUF size | 5.23 GiB (Q4_K_M) |
| Model load | 8.3s (Metal kernel init on first load) |
| TTFT | 274ms |
| Tokens/sec | 19.6 |
| t/s at 8k ctx | 11.9 (stable — SSM architecture) |
| Min RAM | 16 GB |
Integration path
Ornith uses apply_chat_template_oaicompat with use_jinja: true — same path as Gemma 4 E4B. No new model-loading code is needed; it routes through the existing OAI-compat pipeline.
Acceptance Criteria
- Catalog entry: Add
ornith-9b-q4_k_mto the model catalog withModelFamily::Qwen35(or a newOrnithvariant if behavior diverges). Setmin_ram_gb: 16, correct GGUF filename (ornith-1.0-9b-Q4_K_M.gguf), HuggingFace source URL. -
ModelFamilywiring:agent_types.rsandmodel_manager.rsrecognize Ornith (viaQwen35mapping or dedicated variant) and route toapply_chat_template_oaicompatwithuse_jinja: true. -
update_nodeprompt fix: Update theupdate_nodetool description / example in the system prompt so the model calls the tool directly rather than asking for confirmation. Validate 2/2 trials pass. -
<think>routing path: Add<think>/</think>detection toChatEngine(analogous to Gemma 4'sChannelSplitter) so thinking tokens emit asChatChunk::Reasoningevents rather than leaking intoChatChunk::Content. Gate behind a model-family flag orenable_thinkingconfig. - Unit tests: Add tests for
parse_tool_calls_xmlcovering: single call, multiple calls, missing</tool_call>close, missing</parameter>, empty parameter body. - Smoke test: Load Ornith 9B, send one tool-calling prompt, confirm
ChatChunk::ToolCallStart+ChatChunk::ToolCallArgsare emitted (no plain-text leakage of<tool_call>XML).
Files to Touch
packages/nlp-engine/src/chat/parser.rs— add unit tests forparse_tool_calls_xml(parser already implemented)packages/nlp-engine/src/chat/mod.rs— add<think>/</think>routing path inemit_oai_delta()or a newOrnithChannelSplitterpackages/agent/src/agent_types.rs— addOrnithvariant or confirmQwen35covers itpackages/agent/src/model_manager.rs— catalog entry + routing- System prompt / tool descriptions —
update_nodeexample fix
Out of Scope
- Ornith 35B MoE (48 GB tier) — separate issue
- Replacing Gemma 4 E4B or Ministral 8B — keep all three; each serves a different profile
- Automatic default model changes — Ornith should be user-selectable first
Activity
malibio commentedon Jul 1, 2026
Frontend baseline: 140 test files passed, 3893 tests passed (39.14s)