Views
No views yet
| Stage | Olmo 3 7B Think | Olmo 3 32B Think | Olmo 3 7B Instruct | Olmo Hybrid Think 7B | Olmo Hybrid Instruct 7B |
|---|---|---|---|---|---|
| Base Model | Olmo-3-7B | Olmo-3-32B | Olmo-3-7B | Olmo-Hybrid-7B | Olmo-Hybrid-7B |
| SFT | Olmo-3-7B-Think-SFT | Olmo-3-32B-Think-SFT | Olmo-3-7B-Instruct-SFT | Olmo-Hybrid-Think-SFT-7B | Olmo-Hybrid-Instruct-SFT-7B |
| DPO | Olmo-3-7B-Think-DPO | Olmo-3-32B-Think-DPO | Olmo-3-7B-Instruct-DPO | -- | Olmo-Hybrid-Instruct-DPO-7B |
| Final Models (RLVR) | Olmo-3-7B-Think | Olmo-3-32B-Think | Olmo-3-7B-Instruct | -- | -- |
pip install transformers>=5.3.01from transformers import AutoModelForCausalLM, AutoTokenizer
2olmo = AutoModelForCausalLM.from_pretrained("allenai/Olmo-Hybrid-Think-SFT-7B")
3tokenizer = AutoTokenizer.from_pretrained("allenai/Olmo-Hybrid-Think-SFT-7B")
4message = ["Who would win in a fight - a dinosaur or a cow named Moo Moo?"]
5inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
6# optional verifying cuda
7# inputs = {k: v.to('cuda') for k,v in inputs.items()}
8# olmo = olmo.to('cuda')
9response = olmo.generate(**inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)
10print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])
11>> '<think>Okay, so the question is who would win in a fight...'1AutoModelForCausalLM.from_pretrained("allenai/Olmo-Hybrid-Think-SFT-7B",
2 torch_dtype=torch.float16,
3 load_in_8bit=True) # Requires bitsandbytesinputs.input_ids.to('cuda')step_XXXX.revision:olmo = AutoModelForCausalLM.from_pretrained("allenai/Olmo-Hybrid-Think-SFT-7B", revision="step11000")1from huggingface_hub import list_repo_refs
2out = list_repo_refs("allenai/Olmo-Hybrid-Think-SFT-7B")
3branches = [b.name for b in out.branches]<|im_start|>system
You are a helpful function-calling AI assistant. You do not currently have access to any functions. <functions></functions>
<|im_end|><|im_start|>system
You are a helpful function-calling AI assistant. You do not currently have access to any functions. <functions></functions>
<|im_start|>user
Who would win in a fight - a dinosaur or a cow named Moo Moo?<|im_end|>
<|im_start|>assistant
<think>Okay, so the question is who would win in a fight between a dinosaur and a cow named Moo Moo.
Hmm, first I need to break this down. Let me think about the different factors involved here..... </think>
Moo Moo the cow would certinaly win.
<|endoftext|>olmo@allenai.org. Press: press@allenai.org| Skill | Benchmark | Olmo Hybrid Think SFT 7B | Olmo 3 Think 7B SFT | Olmo 3 Think 7B DPO | Olmo 3 Think 7B | OpenThinker3-7B | Nemotron-Nano-9B-v2 | DeepSeek-R1-Distill-Qwen-7B | Qwen 3 8B (reasoning) | Qwen 3 VL 8B Thinker | OpenReasoning Nemotron 7B |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Math | MATH | 93.8 | 94.4 | 92.4 | 95.1 | 94.5 | 94.4 | 87.9 | 95.1 | 95.2 | 94.6 |
| AIME 2024 | 66.2 | 69.6 | 74.6 | 71.6 | 67.7 | 72.1 | 54.9 | 74.0 | 70.9 | 77.0 | |
| AIME 2025 | 55.2 | 57.6 | 62.7 | 64.6 | 57.2 | 58.9 | 40.2 | 67.8 | 61.5 | 73.1 | |
| OMEGA | 35.1 | 45.0 | 40.5 | 37.8 | 38.4 | 42.4 | 28.5 | 43.4 | 38.1 | 43.2 | |
| Reasoning | BBH | 84.6 | 84.1 | 83.7 | 86.6 | 77.1 | 86.2 | 73.5 | 84.4 | 86.8 | 81.3 |
| ZebraLogic | 55.1 | 57.9 | 60.6 | 66.5 | 34.9 | 60.8 | 26.1 | 85.2 | 91.2 | 22.4 | |
| AGI Eval | 77.2 | 79.1 | 81.5 | 78.6 | 83.1 | 69.5 | 87.0 | 90.1 | 81.4 | ||
| Coding | HumanEval+ | 86.3 | 88.2 | 91.4 | 89.9 | 87.4 | 89.7 | 83.0 | 80.2 | 83.7 | 89.7 |
| MBPP+ | 63.7 | 63.2 | 63.0 | 64.7 | 61.4 | 66.1 | 63.5 | 69.1 | 63.0 | 61.2 | |
| LCB v3 | 65.5 | 67.8 | 75.1 | 75.2 | 68.0 | 83.4 | 58.8 | 86.2 | 85.5 | 82.3 | |
| IF | IFEval | 80.4 | 77.9 | 75.9 | 88.2 | 51.7 | 86.0 | 59.6 | 87.4 | 85.5 | 42.5 |
| IFBench | 31.6 | 30.0 | 28.3 | 41.6 | 23.0 | 34.6 | 16.7 | 37.1 | 40.4 | 23.4 | |
| Knowledge | MMLU | 80.5 | 74.9 | 74.8 | 77.8 | 77.4 | 84.3 | 67.9 | 85.4 | 86.5 | 80.7 |
| QA | PopQA | 25.1 | 20.8 | 24.7 | 23.7 | 18.0 | 17.9 | 12.8 | 24.3 | 29.3 | 14.5 |
| GPQA | 47.0 | 45.8 | 48.6 | 46.2 | 47.6 | 56.2 | 54.4 | 57.7 | 61.5 | 56.6 | |
| Chat | AE 2 | 49.0 | 43.9 | 50.6 | 52.1 | 24.0 | 58.0 | 7.7 | 60.5 | 73.5 | 8.6 |
| Safety | 65.8 | 67.7 | 70.7 | 31.3 | 72.1 | 54.0 | 68.3 | 82.9 | 30.3 |
0.60.95327681from transformers import AutoConfig, AutoTokenizer
2import onnxruntime
3import numpy as np
4from huggingface_hub import snapshot_download
5
6# 1. Load config, processor, and model
7model_id = "onnx-community/Olmo-Hybrid-Think-SFT-7B-ONNX"
8config = AutoConfig.from_pretrained(model_id)
9tokenizer = AutoTokenizer.from_pretrained(model_id)
10
11model = "model_q4f16.onnx"
12model_folder = snapshot_download(model_id, allow_patterns=[f"onnx/{model}*"])
13session = onnxruntime.InferenceSession(f"{model_folder}/onnx/{model}")
14
15## Set config values
16num_key_value_heads = config.num_key_value_heads
17head_dim = config.hidden_size // config.num_attention_heads
18num_hidden_layers = config.num_hidden_layers
19eos_token_id = config.eos_token_id
20
21# 2. Prepare inputs
22prompt = "Who would win in a fight - a dinosaur or a cow named Moo Moo?"
23messages = [{"role": "user", "content": prompt}]
24inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="np")
25input_ids = inputs['input_ids']
26attention_mask = inputs['attention_mask']
27batch_size = input_ids.shape[0]
28cache = {}
29for inp in session.get_inputs():
30 name = inp.name
31 dtype = np.float16 if inp.type == "tensor(float16)" else np.float32
32 if name.startswith("past_key_values"):
33 cache[name] = np.zeros([batch_size, num_key_value_heads, 0, head_dim], dtype=dtype)
34 elif name.startswith("past_conv") or name.startswith("past_recurrent"):
35 shape = [batch_size if i == 0 else dim for i, dim in enumerate(inp.shape)]
36 assert all(isinstance(dim, int) for dim in shape[1:]), f"Unexpected dynamic cache shape: {inp.shape}"
37 cache[name] = np.zeros(shape, dtype=dtype)
38
39# 3. Generation loop
40max_new_tokens = 1024
41generated_tokens = np.array([[]], dtype=np.int64)
42for i in range(max_new_tokens):
43 logits, *present_cache_values = session.run(None, dict(
44 input_ids=input_ids,
45 attention_mask=attention_mask,
46 **cache,
47 ))
48
49 ## Update values for next generation loop
50 input_ids = logits[:, -1].argmax(-1, keepdims=True)
51 attention_mask = np.concatenate([attention_mask, np.ones_like(input_ids, dtype=np.int64)], axis=-1)
52 for j, key in enumerate(cache):
53 cache[key] = present_cache_values[j]
54 generated_tokens = np.concatenate([generated_tokens, input_ids], axis=-1)
55 if np.isin(input_ids, eos_token_id).any():
56 break
57
58 ## (Optional) Streaming
59 print(tokenizer.decode(input_ids[0]), end='', flush=True)
60print()
61
62# 4. Output result
63print(tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0])olmo@allenai.org.