Text Generation
Transformers
Safetensors
olmo3
code
reasoning
lora-merged
livecodebench
conversational
Instructions to use modrill/code-think-o7b-20260908 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use modrill/code-think-o7b-20260908 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="modrill/code-think-o7b-20260908") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("modrill/code-think-o7b-20260908") model = AutoModelForCausalLM.from_pretrained("modrill/code-think-o7b-20260908", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use modrill/code-think-o7b-20260908 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "modrill/code-think-o7b-20260908" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "modrill/code-think-o7b-20260908", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/modrill/code-think-o7b-20260908
- SGLang
How to use modrill/code-think-o7b-20260908 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 "modrill/code-think-o7b-20260908" \ --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": "modrill/code-think-o7b-20260908", "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 "modrill/code-think-o7b-20260908" \ --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": "modrill/code-think-o7b-20260908", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use modrill/code-think-o7b-20260908 with Docker Model Runner:
docker model run hf.co/modrill/code-think-o7b-20260908
Add provenance/POLICY.json
Browse files- provenance/POLICY.json +159 -0
provenance/POLICY.json
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"arms": [
|
| 3 |
+
{
|
| 4 |
+
"arm_id": "O7B-THINK",
|
| 5 |
+
"data": {
|
| 6 |
+
"assistant_target_tokens": 63378772,
|
| 7 |
+
"manifest_file_sha256": "2d7e9e7d85c88ad60cd12df874fd903f00c017cffe9990a8c6fb5f444642dbf3",
|
| 8 |
+
"manifest_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/THINK_PAIRED_V4_2EP_O7B_READY.json",
|
| 9 |
+
"manifest_sha256": "2d7e9e7d85c88ad60cd12df874fd903f00c017cffe9990a8c6fb5f444642dbf3",
|
| 10 |
+
"max_assistant_target_tokens_per_example": 16384,
|
| 11 |
+
"payload_rows": 9430,
|
| 12 |
+
"payload_sha256": "17554a69f4b99d6d0b0861bece9e959a664084e00dc38ee76a5ba711e2d8da60",
|
| 13 |
+
"source_revision": "3a7a0a0636ec96e3c1ec42ebe79ade467caa040d"
|
| 14 |
+
},
|
| 15 |
+
"gpu": 2,
|
| 16 |
+
"model": {
|
| 17 |
+
"config_sha256": "277d7ea5c6159d4c2d6986a8a23757d1ef06acaa7abc2c40e0513446f7db0f85",
|
| 18 |
+
"hf_id": "allenai/Olmo-3-1025-7B",
|
| 19 |
+
"local_path": "/workspace/code-sft-infra/models/olmo-3-1025-7b",
|
| 20 |
+
"revision": "a81bae42db3975be1671e27b9c9a56da1a9f980f",
|
| 21 |
+
"tie_word_embeddings": false,
|
| 22 |
+
"tokenizer_sha256": "73fd5254624f39a88e3faac6a8e11300fc3c735ed37880d4f4f08db898eaecca"
|
| 23 |
+
},
|
| 24 |
+
"model_id": "olmo3-1025-7b-sdpa",
|
| 25 |
+
"renderer": {
|
| 26 |
+
"assistant_termination": {
|
| 27 |
+
"final_text_suffix": "<|endoftext|>",
|
| 28 |
+
"final_token_suffix": [
|
| 29 |
+
100257
|
| 30 |
+
],
|
| 31 |
+
"turn_end_token_id": 100265
|
| 32 |
+
},
|
| 33 |
+
"chat_template_kwargs": {},
|
| 34 |
+
"chat_template_sha256": "03348cf1aab6c187117df83b81525a2c688934636a63b1c4a0acf9b2488c210e",
|
| 35 |
+
"encoding_policy": {
|
| 36 |
+
"add_special_tokens": false,
|
| 37 |
+
"assistant_termination_in_loss": true,
|
| 38 |
+
"assistant_termination_in_target_census": true,
|
| 39 |
+
"incomplete_target": "reject",
|
| 40 |
+
"padding_label_mask": "attention_or_pad_positions_never_token_id"
|
| 41 |
+
},
|
| 42 |
+
"eos_token": "<|endoftext|>",
|
| 43 |
+
"eos_token_id": 100257,
|
| 44 |
+
"mode": "think",
|
| 45 |
+
"runtime_tokenizer_manifest_sha256": "33d099e5a93f3c02c042b149363879c5026a9abcd8e27d64cb20039c10fa08f2",
|
| 46 |
+
"runtime_tokenizer_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/tokenizers/olmo3-lcb-noprefill",
|
| 47 |
+
"stop_token_ids": [
|
| 48 |
+
100257,
|
| 49 |
+
100265
|
| 50 |
+
],
|
| 51 |
+
"system_prompt_policy": "no_explicit_system_message_use_pinned_template_behavior",
|
| 52 |
+
"system_prompt_policy_sha256": "840bfec7670f7248c051bfb7eb8bc7b842a41ca644531696a08676f058c1c410",
|
| 53 |
+
"tokenizer_hf_id": "allenai/Olmo-3-7B-Think",
|
| 54 |
+
"tokenizer_revision": "d97e442d7cc678210054dbcc9b440894d62c89a4",
|
| 55 |
+
"tokenizer_sha256": "73fd5254624f39a88e3faac6a8e11300fc3c735ed37880d4f4f08db898eaecca"
|
| 56 |
+
},
|
| 57 |
+
"renderer_authority": {
|
| 58 |
+
"path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/tokenizers/olmo3-lcb-noprefill.authority.json",
|
| 59 |
+
"sha256": "162967ab55d8cd97f7756069d044bad3aa654faa1dc20e02aeb4bbb91bf1659a"
|
| 60 |
+
},
|
| 61 |
+
"renderer_id": "olmo3-lcb-noprefill",
|
| 62 |
+
"source_id": "rstar-coder"
|
| 63 |
+
}
|
| 64 |
+
],
|
| 65 |
+
"generation_behavior_gate": null,
|
| 66 |
+
"owner_authorization": "PI 2026-09-08 Think-only three-arm release",
|
| 67 |
+
"recipe": {
|
| 68 |
+
"adapter": {
|
| 69 |
+
"alpha": 128,
|
| 70 |
+
"dropout": 0.0,
|
| 71 |
+
"method": "lora",
|
| 72 |
+
"modules_to_save": null,
|
| 73 |
+
"rank": 64,
|
| 74 |
+
"target_modules": [
|
| 75 |
+
"q_proj",
|
| 76 |
+
"k_proj",
|
| 77 |
+
"v_proj",
|
| 78 |
+
"o_proj",
|
| 79 |
+
"gate_proj",
|
| 80 |
+
"up_proj",
|
| 81 |
+
"down_proj"
|
| 82 |
+
]
|
| 83 |
+
},
|
| 84 |
+
"boundary": {
|
| 85 |
+
"fp32_master": true,
|
| 86 |
+
"mode": "trainable_token_rows_both_sides",
|
| 87 |
+
"row_lr": 0.0001,
|
| 88 |
+
"row_weight_decay": 0.0,
|
| 89 |
+
"token_ids": [
|
| 90 |
+
100257
|
| 91 |
+
],
|
| 92 |
+
"untie_tied_embeddings": true
|
| 93 |
+
},
|
| 94 |
+
"checkpoint_target_tokens": [
|
| 95 |
+
31722729,
|
| 96 |
+
47449622,
|
| 97 |
+
63378772
|
| 98 |
+
],
|
| 99 |
+
"epochs": 2,
|
| 100 |
+
"gradient_checkpointing": true,
|
| 101 |
+
"max_sequence_length": 32768,
|
| 102 |
+
"model_runtime": {
|
| 103 |
+
"bf16": true,
|
| 104 |
+
"finetuning_type": "lora",
|
| 105 |
+
"gradient_checkpointing": true,
|
| 106 |
+
"lora_alpha": 128,
|
| 107 |
+
"lora_dropout": 0.0,
|
| 108 |
+
"lora_rank": 64,
|
| 109 |
+
"lora_targets": [
|
| 110 |
+
"q_proj",
|
| 111 |
+
"k_proj",
|
| 112 |
+
"v_proj",
|
| 113 |
+
"o_proj",
|
| 114 |
+
"gate_proj",
|
| 115 |
+
"up_proj",
|
| 116 |
+
"down_proj"
|
| 117 |
+
],
|
| 118 |
+
"modules_to_save": null,
|
| 119 |
+
"trainable_dtype": "float32",
|
| 120 |
+
"trainable_token_indices": {
|
| 121 |
+
"embed_tokens": [
|
| 122 |
+
100257
|
| 123 |
+
],
|
| 124 |
+
"lm_head": [
|
| 125 |
+
100257
|
| 126 |
+
]
|
| 127 |
+
}
|
| 128 |
+
},
|
| 129 |
+
"optimizer": {
|
| 130 |
+
"betas": [
|
| 131 |
+
0.9,
|
| 132 |
+
0.95
|
| 133 |
+
],
|
| 134 |
+
"eps": 1e-08,
|
| 135 |
+
"gradient_clip_norm": 1.0,
|
| 136 |
+
"learning_rate": 0.0001,
|
| 137 |
+
"name": "adamw",
|
| 138 |
+
"weight_decay": 0.1
|
| 139 |
+
},
|
| 140 |
+
"packing": {
|
| 141 |
+
"enabled": false
|
| 142 |
+
},
|
| 143 |
+
"precision": "bfloat16",
|
| 144 |
+
"repeat_examples": false,
|
| 145 |
+
"scheduler": "cosine_by_assistant_target_token_dose",
|
| 146 |
+
"seed": 42,
|
| 147 |
+
"target_assistant_tokens": 63378772,
|
| 148 |
+
"tokens_per_optimizer_update": 65536,
|
| 149 |
+
"trainable_dtype": "float32",
|
| 150 |
+
"truncation": false,
|
| 151 |
+
"warmup_target_tokens": 3802726
|
| 152 |
+
},
|
| 153 |
+
"runtime": {
|
| 154 |
+
"checkpoint_root": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/O7B-THINK/out",
|
| 155 |
+
"state_root": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/O7B-THINK"
|
| 156 |
+
},
|
| 157 |
+
"schema": "CODE_SFT_RSTAR_DUAL_TRAINING_POLICY_V1",
|
| 158 |
+
"status": "SEALED"
|
| 159 |
+
}
|