Instructions to use ornith-ai/Ornith-1.0-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ornith-ai/Ornith-1.0-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ornith-ai/Ornith-1.0-9B") 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-9B") model = AutoModelForMultimodalLM.from_pretrained("ornith-ai/Ornith-1.0-9B", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ornith-ai/Ornith-1.0-9B 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-9B" # 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-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ornith-ai/Ornith-1.0-9B
- SGLang
How to use ornith-ai/Ornith-1.0-9B 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-9B" \ --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-9B", "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-9B" \ --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-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ornith-ai/Ornith-1.0-9B with Docker Model Runner:
docker model run hf.co/ornith-ai/Ornith-1.0-9B
deep-reinforce commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -302,53 +302,129 @@ You can point any OpenAI-compatible SDK (Python, Node.js, etc.) or `curl` at the
|
|
| 302 |
|
| 303 |
## Agentic Usage
|
| 304 |
|
| 305 |
-
|
| 306 |
|
| 307 |
### Agent Frameworks
|
| 308 |
|
| 309 |
Because Ornith-1.0-9B 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-9B to tools through an MCP server.
|
| 310 |
|
| 311 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
```
|
| 314 |
|
| 315 |
**Examples of using Ornith with agent harness:**
|
| 316 |
|
| 317 |
#### Hermes Agent
|
| 318 |
```bash
|
| 319 |
-
|
|
|
|
|
|
|
|
|
|
| 320 |
```
|
| 321 |
|
| 322 |
-
|
|
|
|
| 323 |
```bash
|
|
|
|
|
|
|
|
|
|
|
|
|
| 324 |
|
|
|
|
|
|
|
| 325 |
```
|
| 326 |
|
| 327 |
-
####
|
| 328 |
-
```bash
|
| 329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
```
|
| 331 |
|
| 332 |
#### Unsloth Studio
|
| 333 |
|
| 334 |
```bash
|
| 335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
```
|
| 337 |
|
| 338 |
-
|
| 339 |
-
#### OpenClaw
|
| 340 |
-
|
| 341 |
```bash
|
|
|
|
| 342 |
|
| 343 |
-
|
|
|
|
|
|
|
|
|
|
| 344 |
|
|
|
|
|
|
|
|
|
|
| 345 |
|
| 346 |
### Coding CLIs
|
| 347 |
|
|
|
|
| 348 |
|
| 349 |
#### OpenCode
|
| 350 |
```bash
|
| 351 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 352 |
```
|
| 353 |
|
| 354 |
### Citation
|
|
|
|
| 302 |
|
| 303 |
## Agentic Usage
|
| 304 |
|
| 305 |
+
Ornith-1.0-9B excels in tool-calling and agentic coding capabilities.
|
| 306 |
|
| 307 |
### Agent Frameworks
|
| 308 |
|
| 309 |
Because Ornith-1.0-9B 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-9B to tools through an MCP server.
|
| 310 |
|
| 311 |
```python
|
| 312 |
+
import os
|
| 313 |
+
from openai import OpenAI
|
| 314 |
+
|
| 315 |
+
client = OpenAI(
|
| 316 |
+
base_url=os.getenv("OPENAI_BASE_URL", "http://localhost:8000/v1"),
|
| 317 |
+
api_key=os.getenv("OPENAI_API_KEY", "EMPTY"),
|
| 318 |
+
)
|
| 319 |
|
| 320 |
+
tools = [
|
| 321 |
+
{
|
| 322 |
+
"type": "function",
|
| 323 |
+
"function": {
|
| 324 |
+
"name": "run_shell",
|
| 325 |
+
"description": "Run a shell command and return its output.",
|
| 326 |
+
"parameters": {
|
| 327 |
+
"type": "object",
|
| 328 |
+
"properties": {
|
| 329 |
+
"command": {"type": "string", "description": "The command to run"}
|
| 330 |
+
},
|
| 331 |
+
"required": ["command"],
|
| 332 |
+
},
|
| 333 |
+
},
|
| 334 |
+
}
|
| 335 |
+
]
|
| 336 |
+
|
| 337 |
+
messages = [{"role": "user", "content": "List the Python files in the current directory."}]
|
| 338 |
+
|
| 339 |
+
response = client.chat.completions.create(
|
| 340 |
+
model="deepreinforce-ai/Ornith-1.0-9B",
|
| 341 |
+
messages=messages,
|
| 342 |
+
tools=tools,
|
| 343 |
+
temperature=0.6,
|
| 344 |
+
top_p=0.95,
|
| 345 |
+
)
|
| 346 |
+
print(response.choices[0].message)
|
| 347 |
```
|
| 348 |
|
| 349 |
**Examples of using Ornith with agent harness:**
|
| 350 |
|
| 351 |
#### Hermes Agent
|
| 352 |
```bash
|
| 353 |
+
# Hermes talks to any OpenAI-compatible endpoint — point it at your Ornith server.
|
| 354 |
+
export OPENAI_BASE_URL="http://localhost:8000/v1"
|
| 355 |
+
export OPENAI_API_KEY="EMPTY"
|
| 356 |
+
export MODEL="deepreinforce-ai/Ornith-1.0-9B"
|
| 357 |
```
|
| 358 |
|
| 359 |
+
|
| 360 |
+
#### Atomic.chat / Ollama / llama.cpp
|
| 361 |
```bash
|
| 362 |
+
# Both runtimes load a GGUF build of Ornith (publish one at deepreinforce-ai/Ornith-1.0-9B-GGUF).
|
| 363 |
+
|
| 364 |
+
# llama.cpp — serve an OpenAI-compatible API on port 8000.
|
| 365 |
+
llama-server -hf deepreinforce-ai/Ornith-1.0-9B-GGUF --port 8000 -c 262144
|
| 366 |
|
| 367 |
+
# Ollama — pull and chat with the same GGUF straight from Hugging Face.
|
| 368 |
+
ollama run hf.co/deepreinforce-ai/Ornith-1.0-9B-GGUF
|
| 369 |
```
|
| 370 |
|
| 371 |
+
#### OpenClaw
|
|
|
|
| 372 |
|
| 373 |
+
```bash
|
| 374 |
+
# OpenClaw talks to any OpenAI-compatible endpoint — point it at your Ornith server.
|
| 375 |
+
export OPENAI_BASE_URL="http://localhost:8000/v1"
|
| 376 |
+
export OPENAI_API_KEY="EMPTY"
|
| 377 |
+
export OPENAI_MODEL="deepreinforce-ai/Ornith-1.0-9B"
|
| 378 |
```
|
| 379 |
|
| 380 |
#### Unsloth Studio
|
| 381 |
|
| 382 |
```bash
|
| 383 |
+
pip install unsloth
|
| 384 |
+
|
| 385 |
+
# Load Ornith for fast local inference or fine-tuning (Python):
|
| 386 |
+
# from unsloth import FastLanguageModel
|
| 387 |
+
# model, tokenizer = FastLanguageModel.from_pretrained(
|
| 388 |
+
# "deepreinforce-ai/Ornith-1.0-9B",
|
| 389 |
+
# max_seq_length=262144,
|
| 390 |
+
# load_in_4bit=True,
|
| 391 |
+
# )
|
| 392 |
```
|
| 393 |
|
| 394 |
+
#### OpenHands
|
|
|
|
|
|
|
| 395 |
```bash
|
| 396 |
+
pip install openhands-ai
|
| 397 |
|
| 398 |
+
# OpenHands routes through LiteLLM; the "openai/" prefix selects the OpenAI-compatible path.
|
| 399 |
+
export LLM_MODEL="openai/deepreinforce-ai/Ornith-1.0-9B"
|
| 400 |
+
export LLM_BASE_URL="http://localhost:8000/v1"
|
| 401 |
+
export LLM_API_KEY="EMPTY"
|
| 402 |
|
| 403 |
+
# Launch the CLI (or run the official OpenHands Docker image with the same env vars).
|
| 404 |
+
openhands
|
| 405 |
+
```
|
| 406 |
|
| 407 |
### Coding CLIs
|
| 408 |
|
| 409 |
+
Ornith-1.0-9B is optimized for terminal-based coding agents. Point any OpenAI-compatible coding CLI at your Ornith-1.0-9B endpoint (set `OPENAI_BASE_URL` and `OPENAI_API_KEY`) to understand large codebases, automate tedious work, and ship faster.
|
| 410 |
|
| 411 |
#### OpenCode
|
| 412 |
```bash
|
| 413 |
+
# Register your local Ornith endpoint as a provider in ~/.config/opencode/opencode.json:
|
| 414 |
+
#
|
| 415 |
+
# {
|
| 416 |
+
# "$schema": "https://opencode.ai/config.json",
|
| 417 |
+
# "provider": {
|
| 418 |
+
# "ornith": {
|
| 419 |
+
# "npm": "@ai-sdk/openai-compatible",
|
| 420 |
+
# "name": "Ornith (local)",
|
| 421 |
+
# "options": { "baseURL": "http://localhost:8000/v1", "apiKey": "EMPTY" },
|
| 422 |
+
# "models": { "deepreinforce-ai/Ornith-1.0-9B": { "name": "Ornith-1.0-9B" } }
|
| 423 |
+
# }
|
| 424 |
+
# }
|
| 425 |
+
# }
|
| 426 |
+
|
| 427 |
+
opencode
|
| 428 |
```
|
| 429 |
|
| 430 |
### Citation
|