chirpchirp commited on
Commit
fbb995a
·
verified ·
1 Parent(s): e0e1301

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -106
README.md CHANGED
@@ -225,7 +225,11 @@ This model card documents **Ornith-1.5-35B-A3B**, the mid-size mixture-of-expert
225
  <li><b>vLLM</b> ≥ 0.19.1</li>
226
  <li><b>SGLang</b> ≥ 0.5.9</li>
227
  </ul>
228
- <p style="margin:0">Recommended sampling parameters: <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">temperature=0.6</code>, <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">top_p=0.95</code>, <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">top_k=20</code> (use <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">temperature=1.0</code> to reproduce the reported benchmark setup).</p>
 
 
 
 
229
  </div>
230
 
231
 
@@ -262,58 +266,42 @@ python -m sglang.launch_server \
262
  --reasoning-parser qwen3
263
  ```
264
 
265
- #### Hugging Face Transformers
266
 
267
- For a quick local test (or to script offline generation), load the model directly with Transformers. Make sure you have a recent release installed see the [Transformers installation guide](https://huggingface.co/docs/transformers/installation); Ornith-1.5-35B-A3B requires `transformers >= 5.8.1`.
268
 
269
- ```python
270
- from transformers import AutoModelForCausalLM, AutoTokenizer
271
 
272
- model_name = "ornith-ai/Ornith-1.5-35B-A3B"
273
 
274
- tokenizer = AutoTokenizer.from_pretrained(model_name)
275
- model = AutoModelForCausalLM.from_pretrained(
276
- model_name,
277
- dtype="auto",
278
- device_map="auto",
279
- )
 
 
 
280
 
281
- messages = [
282
- {"role": "user", "content": "Write a Python function is_prime(n). Keep it short."}
283
- ]
284
- text = tokenizer.apply_chat_template(
285
- messages,
286
- tokenize=False,
287
- add_generation_prompt=True,
288
- )
289
 
290
- inputs = tokenizer(text, return_tensors="pt").to(model.device)
291
- generated = model.generate(
292
- **inputs,
293
- max_new_tokens=512,
294
- do_sample=True,
295
- temperature=0.6,
296
- top_p=0.95,
297
- top_k=20,
298
- )
299
- output_ids = generated[0][inputs.input_ids.shape[1]:]
300
 
301
- # The reply contains a <think> ... </think> reasoning block followed by the answer.
302
- content = tokenizer.decode(output_ids, skip_special_tokens=True)
303
- print(content)
304
- ```
305
 
306
- To split the reasoning trace from the final answer, parse on the `</think>` marker:
307
 
308
- ```python
309
- text = tokenizer.decode(output_ids, skip_special_tokens=True)
310
- if "</think>" in text:
311
- reasoning, answer = text.split("</think>", 1)
312
- reasoning = reasoning.replace("<think>", "").strip()
313
- answer = answer.strip()
314
- else:
315
- reasoning, answer = "", text.strip()
316
- ```
317
 
318
  ### Using Ornith-1.5-35B-A3B via the Chat Completions API
319
 
@@ -381,51 +369,29 @@ You can point any OpenAI-compatible SDK (Python, Node.js, etc.) or `curl` at the
381
 
382
  ## Agentic Usage
383
 
384
- Ornith-1.5-35B-A3B excels in tool-calling and agentic coding capabilities.
385
 
386
- ### Agent Frameworks
387
 
388
- Because Ornith-1.5-35B-A3B 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.5-35B-A3B to tools through an MCP server.
389
 
390
- ```python
391
- import os
392
- from openai import OpenAI
393
-
394
- client = OpenAI(
395
- base_url=os.getenv("OPENAI_BASE_URL", "http://localhost:8000/v1"),
396
- api_key=os.getenv("OPENAI_API_KEY", "EMPTY"),
397
- )
398
-
399
- tools = [
400
- {
401
- "type": "function",
402
- "function": {
403
- "name": "run_shell",
404
- "description": "Run a shell command and return its output.",
405
- "parameters": {
406
- "type": "object",
407
- "properties": {
408
- "command": {"type": "string", "description": "The command to run"}
409
- },
410
- "required": ["command"],
411
- },
412
- },
413
- }
414
- ]
415
 
416
- messages = [{"role": "user", "content": "List the Python files in the current directory."}]
417
 
418
- response = client.chat.completions.create(
419
- model="ornith-ai/Ornith-1.5-35B-A3B",
420
- messages=messages,
421
- tools=tools,
422
- temperature=0.6,
423
- top_p=0.95,
424
- )
425
- print(response.choices[0].message)
426
  ```
427
 
428
- **Examples of using Ornith with agent harness:**
 
 
 
 
429
 
430
  #### Hermes Agent
431
  ```bash
@@ -435,18 +401,6 @@ export OPENAI_API_KEY="EMPTY"
435
  export MODEL="ornith-ai/Ornith-1.5-35B-A3B"
436
  ```
437
 
438
-
439
- #### Atomic.chat / Ollama / llama.cpp
440
- ```bash
441
- # Both runtimes load a GGUF build of Ornith (publish one at ornith-ai/Ornith-1.5-35B-A3B-GGUF).
442
-
443
- # llama.cpp — serve an OpenAI-compatible API on port 8000.
444
- llama-server -hf ornith-ai/Ornith-1.5-35B-A3B-GGUF --port 8000 -c 262144
445
-
446
- # Ollama — pull and chat with the same GGUF straight from Hugging Face.
447
- ollama run hf.co/ornith-ai/Ornith-1.5-35B-A3B-GGUF
448
- ```
449
-
450
  #### OpenClaw
451
 
452
  ```bash
@@ -470,18 +424,6 @@ pip install unsloth
470
  # )
471
  ```
472
 
473
- #### OpenHands
474
- ```bash
475
- pip install openhands-ai
476
-
477
- # OpenHands routes through LiteLLM; the "openai/" prefix selects the OpenAI-compatible path.
478
- export LLM_MODEL="openai/ornith-ai/Ornith-1.5-35B-A3B"
479
- export LLM_BASE_URL="http://localhost:8000/v1"
480
- export LLM_API_KEY="EMPTY"
481
-
482
- # Launch the CLI (or run the official OpenHands Docker image with the same env vars).
483
- openhands
484
- ```
485
 
486
  ### Coding CLIs
487
 
 
225
  <li><b>vLLM</b> ≥ 0.19.1</li>
226
  <li><b>SGLang</b> ≥ 0.5.9</li>
227
  </ul>
228
+ <p style="margin:0 0 6px">Recommended sampling parameters:</p>
229
+ <ul style="margin:0;padding-left:20px">
230
+ <li><b>For general tasks:</b> <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">temperature=0.6</code>, <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">top_p=0.95</code>, <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">top_k=20</code></li>
231
+ <li><b>To reproduce the reported benchmarks:</b> <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">temperature=1.0</code></li>
232
+ </ul>
233
  </div>
234
 
235
 
 
266
  --reasoning-parser qwen3
267
  ```
268
 
269
+ #### For Long-Context
270
 
271
+ Ornith-1.5-35B-A3B handles context windows of up to 262,144 tokens. When a task's combined input and output must go beyond this limit, we suggest extending the effective window with RoPE scaling YaRN is the technique we validate against, and it is already built into both vLLM and SGLang. With a scaling factor of 4.0, the usable window grows to roughly 1M tokens.
272
 
273
+ You can turn YaRN on in either of two ways:
 
274
 
275
+ - **Edit the checkpoint's `config.json`.** Add a `rope_scaling` block to the model configuration:
276
 
277
+ ```json
278
+ {
279
+ "rope_scaling": {
280
+ "rope_type": "yarn",
281
+ "factor": 4.0,
282
+ "original_max_position_embeddings": 262144
283
+ }
284
+ }
285
+ ```
286
 
287
+ - **Override at launch time.** Leave the checkpoint untouched and extend the serve commands above with the equivalent flags.
 
 
 
 
 
 
 
288
 
289
+ vLLM:
 
 
 
 
 
 
 
 
 
290
 
291
+ ```bash
292
+ VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ornith-ai/Ornith-1.5-35B-A3B ... --hf-overrides '{"rope_scaling": {"rope_type": "yarn", "factor": 4.0, "original_max_position_embeddings": 262144}}' --max-model-len 1000000
293
+ ```
 
294
 
295
+ SGLang:
296
 
297
+ ```bash
298
+ SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"rope_scaling": {"rope_type": "yarn", "factor": 4.0, "original_max_position_embeddings": 262144}}' --context-length 1000000
299
+ ```
300
+
301
+ <div style="border-left:4px solid #FD8E5B;background:rgba(253,142,91,0.1);border-radius:6px;padding:12px 16px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:14px;line-height:1.6">
302
+ <div style="font-weight:700;color:#FD8E5B;margin-bottom:6px">📝 NOTE</div>
303
+ <p style="margin:0">Open-source runtimes implement YaRN <i>statically</i>: the same scaling factor is applied to every request regardless of its length, which can slightly hurt quality on ordinary-length inputs. Only enable <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">rope_scaling</code> when your workload genuinely needs the longer window, and size <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">factor</code> to match it — the target window is roughly <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">factor</code> × 262,144, so if your requests top out around 524,288 tokens, <code style="background:rgba(253,142,91,0.15);padding:1px 5px;border-radius:4px">factor: 2.0</code> is the better setting.</p>
304
+ </div>
 
305
 
306
  ### Using Ornith-1.5-35B-A3B via the Chat Completions API
307
 
 
369
 
370
  ## Agentic Usage
371
 
372
+ Ornith-1.5-35B-A3B excels in tool-calling and agentic coding. It exposes an OpenAI-compatible endpoint with tool calling and works out of the box with standard agent frameworks.
373
 
374
+ **Examples of using Ornith with agents:**
375
 
 
376
 
377
+ #### Ollama
378
+ ```bash
379
+ ollama run hf.co/ornith-ai/Ornith-1.5-35B-A3B-GGUF
380
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
 
 
382
 
383
+ #### Atomic.chat
384
+ ```bash
385
+ # Atomic.chat loads a GGUF build of Ornith (ornith-ai/Ornith-1.5-35B-A3B-GGUF)
386
+ # through llama.cpp's OpenAI-compatible API on port 8000.
387
+ llama-server -hf ornith-ai/Ornith-1.5-35B-A3B-GGUF --port 8000 -c 262144
 
 
 
388
  ```
389
 
390
+ #### llama.cpp
391
+ ```bash
392
+ # llama.cpp — serve an OpenAI-compatible API on port 8000.
393
+ llama-server -hf ornith-ai/Ornith-1.5-35B-A3B-GGUF --port 8000 -c 262144
394
+ ```
395
 
396
  #### Hermes Agent
397
  ```bash
 
401
  export MODEL="ornith-ai/Ornith-1.5-35B-A3B"
402
  ```
403
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  #### OpenClaw
405
 
406
  ```bash
 
424
  # )
425
  ```
426
 
 
 
 
 
 
 
 
 
 
 
 
 
427
 
428
  ### Coding CLIs
429