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
| { | |
| "arms": [ | |
| { | |
| "arm_id": "O7B-THINK", | |
| "data": { | |
| "assistant_target_tokens": 63378772, | |
| "manifest_file_sha256": "2d7e9e7d85c88ad60cd12df874fd903f00c017cffe9990a8c6fb5f444642dbf3", | |
| "manifest_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/THINK_PAIRED_V4_2EP_O7B_READY.json", | |
| "manifest_sha256": "2d7e9e7d85c88ad60cd12df874fd903f00c017cffe9990a8c6fb5f444642dbf3", | |
| "max_assistant_target_tokens_per_example": 16384, | |
| "payload_rows": 9430, | |
| "payload_sha256": "17554a69f4b99d6d0b0861bece9e959a664084e00dc38ee76a5ba711e2d8da60", | |
| "source_revision": "3a7a0a0636ec96e3c1ec42ebe79ade467caa040d" | |
| }, | |
| "gpu": 2, | |
| "model": { | |
| "config_sha256": "277d7ea5c6159d4c2d6986a8a23757d1ef06acaa7abc2c40e0513446f7db0f85", | |
| "hf_id": "allenai/Olmo-3-1025-7B", | |
| "local_path": "/workspace/code-sft-infra/models/olmo-3-1025-7b", | |
| "revision": "a81bae42db3975be1671e27b9c9a56da1a9f980f", | |
| "tie_word_embeddings": false, | |
| "tokenizer_sha256": "73fd5254624f39a88e3faac6a8e11300fc3c735ed37880d4f4f08db898eaecca" | |
| }, | |
| "model_id": "olmo3-1025-7b-sdpa", | |
| "renderer": { | |
| "assistant_termination": { | |
| "final_text_suffix": "<|endoftext|>", | |
| "final_token_suffix": [ | |
| 100257 | |
| ], | |
| "turn_end_token_id": 100265 | |
| }, | |
| "chat_template_kwargs": {}, | |
| "chat_template_sha256": "03348cf1aab6c187117df83b81525a2c688934636a63b1c4a0acf9b2488c210e", | |
| "encoding_policy": { | |
| "add_special_tokens": false, | |
| "assistant_termination_in_loss": true, | |
| "assistant_termination_in_target_census": true, | |
| "incomplete_target": "reject", | |
| "padding_label_mask": "attention_or_pad_positions_never_token_id" | |
| }, | |
| "eos_token": "<|endoftext|>", | |
| "eos_token_id": 100257, | |
| "mode": "think", | |
| "runtime_tokenizer_manifest_sha256": "33d099e5a93f3c02c042b149363879c5026a9abcd8e27d64cb20039c10fa08f2", | |
| "runtime_tokenizer_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/tokenizers/olmo3-lcb-noprefill", | |
| "stop_token_ids": [ | |
| 100257, | |
| 100265 | |
| ], | |
| "system_prompt_policy": "no_explicit_system_message_use_pinned_template_behavior", | |
| "system_prompt_policy_sha256": "840bfec7670f7248c051bfb7eb8bc7b842a41ca644531696a08676f058c1c410", | |
| "tokenizer_hf_id": "allenai/Olmo-3-7B-Think", | |
| "tokenizer_revision": "d97e442d7cc678210054dbcc9b440894d62c89a4", | |
| "tokenizer_sha256": "73fd5254624f39a88e3faac6a8e11300fc3c735ed37880d4f4f08db898eaecca" | |
| }, | |
| "renderer_authority": { | |
| "path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/tokenizers/olmo3-lcb-noprefill.authority.json", | |
| "sha256": "162967ab55d8cd97f7756069d044bad3aa654faa1dc20e02aeb4bbb91bf1659a" | |
| }, | |
| "renderer_id": "olmo3-lcb-noprefill", | |
| "source_id": "rstar-coder" | |
| } | |
| ], | |
| "generation_behavior_gate": null, | |
| "owner_authorization": "PI 2026-09-08 Think-only three-arm release", | |
| "recipe": { | |
| "adapter": { | |
| "alpha": 128, | |
| "dropout": 0.0, | |
| "method": "lora", | |
| "modules_to_save": null, | |
| "rank": 64, | |
| "target_modules": [ | |
| "q_proj", | |
| "k_proj", | |
| "v_proj", | |
| "o_proj", | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj" | |
| ] | |
| }, | |
| "boundary": { | |
| "fp32_master": true, | |
| "mode": "trainable_token_rows_both_sides", | |
| "row_lr": 0.0001, | |
| "row_weight_decay": 0.0, | |
| "token_ids": [ | |
| 100257 | |
| ], | |
| "untie_tied_embeddings": true | |
| }, | |
| "checkpoint_target_tokens": [ | |
| 31722729, | |
| 47449622, | |
| 63378772 | |
| ], | |
| "epochs": 2, | |
| "gradient_checkpointing": true, | |
| "max_sequence_length": 32768, | |
| "model_runtime": { | |
| "bf16": true, | |
| "finetuning_type": "lora", | |
| "gradient_checkpointing": true, | |
| "lora_alpha": 128, | |
| "lora_dropout": 0.0, | |
| "lora_rank": 64, | |
| "lora_targets": [ | |
| "q_proj", | |
| "k_proj", | |
| "v_proj", | |
| "o_proj", | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj" | |
| ], | |
| "modules_to_save": null, | |
| "trainable_dtype": "float32", | |
| "trainable_token_indices": { | |
| "embed_tokens": [ | |
| 100257 | |
| ], | |
| "lm_head": [ | |
| 100257 | |
| ] | |
| } | |
| }, | |
| "optimizer": { | |
| "betas": [ | |
| 0.9, | |
| 0.95 | |
| ], | |
| "eps": 1e-08, | |
| "gradient_clip_norm": 1.0, | |
| "learning_rate": 0.0001, | |
| "name": "adamw", | |
| "weight_decay": 0.1 | |
| }, | |
| "packing": { | |
| "enabled": false | |
| }, | |
| "precision": "bfloat16", | |
| "repeat_examples": false, | |
| "scheduler": "cosine_by_assistant_target_token_dose", | |
| "seed": 42, | |
| "target_assistant_tokens": 63378772, | |
| "tokens_per_optimizer_update": 65536, | |
| "trainable_dtype": "float32", | |
| "truncation": false, | |
| "warmup_target_tokens": 3802726 | |
| }, | |
| "runtime": { | |
| "checkpoint_root": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/O7B-THINK/out", | |
| "state_root": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/arms/O7B-THINK" | |
| }, | |
| "schema": "CODE_SFT_RSTAR_DUAL_TRAINING_POLICY_V1", | |
| "status": "SEALED" | |
| } | |