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
| { | |
| "schema": "RUN_IDENTITY_V1", | |
| "run_id": "t30b2507-o7b-think-v4-tail151643", | |
| "corrects": "PAIRED_V4", | |
| "model": { | |
| "hf_id": "allenai/Olmo-3-1025-7B", | |
| "revision": "a81bae42db3975be1671e27b9c9a56da1a9f980f", | |
| "local_path": "/workspace/code-sft-infra/models/olmo-3-1025-7b", | |
| "tied_embeddings": false | |
| }, | |
| "data": { | |
| "path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/THINK_PAIRED_V4_2EP_O7B.parquet", | |
| "rows": 9430, | |
| "sha256": "17554a69f4b99d6d0b0861bece9e959a664084e00dc38ee76a5ba711e2d8da60", | |
| "census": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/TOKEN_CENSUS_V4_O7B_THINK.json", | |
| "physical_2ep": "concat(selected_v4_table, selected_v4_table) same order; token columns overlaid from TOKEN_CENSUS_V4; O7B also rewrites renderer_id", | |
| "source_1ep_path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/THINK_PAIRED_V4.parquet", | |
| "source_1ep_sha256": "cf37c85413f69339508004611e196e42abbc2bddbd3462c209a1b97e1d820002", | |
| "source_1ep_rows": 4715 | |
| }, | |
| "seeds": { | |
| "train": 42, | |
| "eval": 3407 | |
| }, | |
| "parameters": { | |
| "epochs": 2, | |
| "target_assistant_tokens": 63378772, | |
| "active_tokens_1ep": 31689386, | |
| "checkpoint_target_tokens": [ | |
| 31722729, | |
| 47449622, | |
| 63378772 | |
| ], | |
| "milestone_updates": [ | |
| 484, | |
| 724, | |
| 968 | |
| ], | |
| "warmup_target_tokens": 3802726, | |
| "learning_rate": 0.0001, | |
| "row_lr": 0.0001, | |
| "optimizer": "adamw", | |
| "optimizer_betas": [ | |
| 0.9, | |
| 0.95 | |
| ], | |
| "optimizer_eps": 1e-08, | |
| "lora_rank": 64, | |
| "lora_alpha": 128, | |
| "lora_dropout": 0.0, | |
| "lora_target_modules": [ | |
| "q_proj", | |
| "k_proj", | |
| "v_proj", | |
| "o_proj", | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj" | |
| ], | |
| "lora_weight_decay": 0.1, | |
| "row_weight_decay": 0.0, | |
| "max_grad_norm": 1.0, | |
| "tokens_per_optimizer_update": 65536, | |
| "packing": false, | |
| "truncation": false, | |
| "repeat_examples": false, | |
| "precision": "bfloat16", | |
| "trainable_dtype": "float32", | |
| "gradient_checkpointing": true, | |
| "eos_weight": 1.0, | |
| "scheduler": "cosine_by_assistant_target_token_dose", | |
| "worker_lr_scale": "rstar_dual_worker_v4._lr_scale", | |
| "supervised_tail": [ | |
| 100257 | |
| ], | |
| "trainable_token_indices": { | |
| "embed_tokens": [ | |
| 100257 | |
| ], | |
| "lm_head": [ | |
| 100257 | |
| ] | |
| }, | |
| "untie_tied_embeddings": true, | |
| "context": 32768, | |
| "eval": { | |
| "suite": "DEV256", | |
| "seed": 3407, | |
| "temperature": 0.6, | |
| "top_p": 0.95, | |
| "top_k": 20, | |
| "ctx": 32768, | |
| "stop_ids": [ | |
| 100257, | |
| 100265 | |
| ], | |
| "base_reeval_same_mode": true | |
| } | |
| }, | |
| "code": { | |
| "path": "/workspace/tools/rstar_dual_worker_v4.py", | |
| "commit_or_sha256": "97a298e9ee4f0bb571baa88c7d75285ade2ea2a8a9b5875b35db25b5db9b3842", | |
| "template": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/templates/O7B-THINK.template_v3.json" | |
| }, | |
| "started_at": "2026-09-08T07:50:11Z", | |
| "endpoint": "2EP_ONLY @63378772 assistant tokens; no checkpoint picking", | |
| "status": "RUNNING" | |
| } | |