Instructions to use ornith-ai/Ornith-1.0-35B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ornith-ai/Ornith-1.0-35B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ornith-ai/Ornith-1.0-35B") 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("ornith-ai/Ornith-1.0-35B") model = AutoModelForMultimodalLM.from_pretrained("ornith-ai/Ornith-1.0-35B", device_map="auto") 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 ornith-ai/Ornith-1.0-35B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ornith-ai/Ornith-1.0-35B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ornith-ai/Ornith-1.0-35B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ornith-ai/Ornith-1.0-35B
- SGLang
How to use ornith-ai/Ornith-1.0-35B 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 "ornith-ai/Ornith-1.0-35B" \ --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": "ornith-ai/Ornith-1.0-35B", "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 "ornith-ai/Ornith-1.0-35B" \ --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": "ornith-ai/Ornith-1.0-35B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ornith-ai/Ornith-1.0-35B with Docker Model Runner:
docker model run hf.co/ornith-ai/Ornith-1.0-35B
Fix chat_template.jinja: drop hard raise_exception on message order (breaks tool-calling in llama.cpp/LM Studio/Ollama)
Browse files## Summary
`chat_template.jinja` raises a hard Jinja `raise_exception` when a system message is not the first message, and when no user query is found in a multi-step-tool context. These assertions break tool-calling on **every runtime that auto-generates a tool-call parser by probing the template and/or injects its own tool-instruction system message** — including **llama.cpp (`--jinja`), LM Studio, Ollama, opencode, and Claude Code through any of them**.
As soon as a request contains `tools`, the runtime fails *before generating a single token*:
```
400 Unable to generate parser for this template. Automatic parser generation failed:
... raise_exception('System message must be at the beginning...
Error: Jinja Exception: System message must be at the beginning.
```
## Root cause
Tool-calling runtimes do two things this template forbids:
1. They **probe the template** with synthetic message sequences to auto-detect the tool-call format and build a parser/grammar. Some probe sequences do not place a system message first.
2. With `--jinja` + tools, llama.cpp **appends its own system message** (e.g. *"Respond in JSON format, either with `tool_call` … or with `response` …"*), which can land as a second / non-leading system message.
Either path hits `raise_exception('System message must be at the beginning.')` and aborts the whole request.
Importantly, this template builds its tool instructions from the **`tools` parameter** (the `# Tools` / `<tools>` block), **not** from a system message — so the runtime's appended system message is redundant and the hard assertion serves no functional purpose at inference time.
## Fix
Remove the two hard `raise_exception` assertions (`'System message must be at the beginning.'` and `'No user query found in messages.'`). For valid inputs — a leading system message and a user query, i.e. the normal case — the rendered output is **byte-for-byte identical**. This matches how mainstream Qwen-derived instruct templates behave (Qwen3 Instruct, and the widely-used Unsloth Qwen3.6 GGUF templates **merge/tolerate** leading system messages instead of raising), which is why those models work out-of-the-box in these runtimes and Ornith currently does not.
```diff
{%- endfor %}
-{%- if ns.multi_step_tool %}
- {{- raise_exception('No user query found in messages.') }}
-{%- endif %}
{%- for message in messages %}
{%- set content = render_content(message.content, true)|trim %}
{%- if message.role == "system" %}
- {%- if not loop.first %}
- {{- raise_exception('System message must be at the beginning.') }}
- {%- endif %}
{%- elif message.role == "user" %}
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
```
## Verification
- `jinja2` parses the patched template cleanly.
- Served the official `Ornith-1.0-35B-GGUF` (Q8_0) on **llama.cpp build b9611** with the patched template via `--chat-template-file`. A Claude-Code-style request **with `tools`** now returns `200` with a correct tool call — `finish_reason: tool_calls`, `get_weather({"city": "Paris"})`.
- Plain chat and reasoning (`<think>`) output are unchanged.
## Related reports
- llama.cpp `ggml-org/llama.cpp#20733` (exact error), `#18323` (runtime appends a tool-instruction system message), `#18895` (strict templates blocked by verification)
- LM Studio `lmstudio-ai/lmstudio-bug-tracker#1999` (Qwen3.6-35B-A3B + Claude Code, same error)
- SillyTavern `SillyTavern/SillyTavern#5276` (Qwen3.5-122B, same raise)
## Alternative
If you'd rather keep strict validation, an equally good fix is to **merge leading system messages** (as Qwen3 Instruct does) instead of removing the assertion — happy to switch the PR to that approach.
> Note: the published `Ornith-1.0-35B-GGUF` files embed the old template and would need re-quantizing to benefit (until then, users can override at runtime with `--chat-template-file`). Fixing the source template here makes all future conversions and `transformers`/`vLLM` users correct.
- chat_template.jinja +0 -6
|
@@ -75,15 +75,9 @@
|
|
| 75 |
{%- endif %}
|
| 76 |
{%- endif %}
|
| 77 |
{%- endfor %}
|
| 78 |
-
{%- if ns.multi_step_tool %}
|
| 79 |
-
{{- raise_exception('No user query found in messages.') }}
|
| 80 |
-
{%- endif %}
|
| 81 |
{%- for message in messages %}
|
| 82 |
{%- set content = render_content(message.content, true)|trim %}
|
| 83 |
{%- if message.role == "system" %}
|
| 84 |
-
{%- if not loop.first %}
|
| 85 |
-
{{- raise_exception('System message must be at the beginning.') }}
|
| 86 |
-
{%- endif %}
|
| 87 |
{%- elif message.role == "user" %}
|
| 88 |
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 89 |
{%- elif message.role == "assistant" %}
|
|
|
|
| 75 |
{%- endif %}
|
| 76 |
{%- endif %}
|
| 77 |
{%- endfor %}
|
|
|
|
|
|
|
|
|
|
| 78 |
{%- for message in messages %}
|
| 79 |
{%- set content = render_content(message.content, true)|trim %}
|
| 80 |
{%- if message.role == "system" %}
|
|
|
|
|
|
|
|
|
|
| 81 |
{%- elif message.role == "user" %}
|
| 82 |
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
| 83 |
{%- elif message.role == "assistant" %}
|