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
Download provenance/TRAINING_CONFIG.json from modrill/code-think-o7b-20260908: direct link, hf CLI and curl.
- Browser
- Download file 5.29 kB
-
https://huggingface.co/modrill/code-think-o7b-20260908/resolve/main/provenance/TRAINING_CONFIG.json
- Command line
-
hf download hf://modrill/code-think-o7b-20260908/provenance/TRAINING_CONFIG.json
-
curl -L -o TRAINING_CONFIG.json https://huggingface.co/modrill/code-think-o7b-20260908/resolve/main/provenance/TRAINING_CONFIG.json
5.29 kB
| { | |
| "schema": "code-sixarm-training-config/v4", | |
| "status": "READY_NOT_STARTED", | |
| "config_id": "O7B-THINK", | |
| "arm_id": "O7B-THINK", | |
| "corrects": "PAIRED_V4", | |
| "base": { | |
| "model_id": "allenai/Olmo-3-1025-7B", | |
| "revision": "a81bae42db3975be1671e27b9c9a56da1a9f980f", | |
| "local_path": "/workspace/code-sft-infra/models/olmo-3-1025-7b", | |
| "pure_base": true, | |
| "warm_start_adapter": null, | |
| "tied_embeddings": false, | |
| "tokenizer_sha256": "73fd5254624f39a88e3faac6a8e11300fc3c735ed37880d4f4f08db898eaecca", | |
| "tokenizer_config_sha256": null | |
| }, | |
| "boundary": { | |
| "mode": "trainable_token_rows_both_sides", | |
| "token_ids": [ | |
| 100257 | |
| ], | |
| "token_names": { | |
| "100257": "<|endoftext|>" | |
| }, | |
| "row_lr": 0.0001, | |
| "row_weight_decay": 0.0, | |
| "fp32_master": true, | |
| "untie_tied_embeddings": true | |
| }, | |
| "context": { | |
| "model_context": 32768, | |
| "packing": false, | |
| "truncation": false | |
| }, | |
| "checkpoint": { | |
| "milestone_updates": [ | |
| 484, | |
| 724, | |
| 968 | |
| ], | |
| "checkpoint_target_tokens": [ | |
| 31722729, | |
| 47449622, | |
| 63378772 | |
| ], | |
| "save_only_do_not_pick": true, | |
| "right_side_3_only": true, | |
| "primary": "2EP_FINAL_ONLY", | |
| "note": "right-side: first update fully past 1.0ep, 1.5ep, plus 2ep endpoint" | |
| }, | |
| "data": { | |
| "path": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/THINK_PAIRED_V4_2EP_O7B.parquet", | |
| "sha256": "17554a69f4b99d6d0b0861bece9e959a664084e00dc38ee76a5ba711e2d8da60", | |
| "unique_rows": 4715, | |
| "payload_rows": 9430, | |
| "physical_rows": 9430, | |
| "epochs": 2, | |
| "physical_2ep_rule": "concat(selected_v4_table, selected_v4_table) same order; parquet on disk is one 4715-row copy", | |
| "planned_active_tokens": 63378772, | |
| "active_tokens_1ep": 31689386, | |
| "full_tokens_1ep": 34204230, | |
| "optimizer_updates": 968, | |
| "census": "/workspace/code-sft-runs/t30b2507-q4b-tn-v2-lr1e4-e1-20260907/data/TOKEN_CENSUS_V4_O7B_THINK.json", | |
| "duplicate_rows_allowed": true, | |
| "order_mutation_allowed": false, | |
| "token_columns_in_parquet": "legacy tail [151645,198] for Qwen; training uses census/v3 render", | |
| "source_1ep_sha256": "cf37c85413f69339508004611e196e42abbc2bddbd3462c209a1b97e1d820002" | |
| }, | |
| "model_runtime": { | |
| "bf16": true, | |
| "trainable_dtype": "float32", | |
| "finetuning_type": "lora", | |
| "lora_rank": 64, | |
| "lora_alpha": 128, | |
| "lora_dropout": 0.0, | |
| "lora_targets": [ | |
| "q_proj", | |
| "k_proj", | |
| "v_proj", | |
| "o_proj", | |
| "gate_proj", | |
| "up_proj", | |
| "down_proj" | |
| ], | |
| "modules_to_save": null, | |
| "gradient_checkpointing": true, | |
| "trainable_token_indices": { | |
| "embed_tokens": [ | |
| 100257 | |
| ], | |
| "lm_head": [ | |
| 100257 | |
| ] | |
| } | |
| }, | |
| "optimization": { | |
| "active_tokens_per_update_target": 65536, | |
| "betas": [ | |
| 0.9, | |
| 0.95 | |
| ], | |
| "epsilon": 1e-08, | |
| "learning_rate": 0.0001, | |
| "max_grad_norm": 1.0, | |
| "optimizer": "adamw", | |
| "weight_decay": 0.1, | |
| "whole_row_microsteps": true, | |
| "warmup_fraction": 0.06, | |
| "warmup_target_tokens": 3802726, | |
| "scheduler": "cosine_by_assistant_target_token_dose", | |
| "min_lr_ratio": 0.0, | |
| "scheduler_horizon_optimizer_updates": 968, | |
| "target_assistant_tokens": 63378772, | |
| "worker_lr_scale": "rstar_dual_worker_v4._lr_scale" | |
| }, | |
| "performance_recipe": { | |
| "eos_weight": 1.0, | |
| "prompt_mask": -100 | |
| }, | |
| "recipe_worker_fields": { | |
| "tokens_per_optimizer_update": 65536, | |
| "max_sequence_length": 32768, | |
| "packing": { | |
| "enabled": false | |
| }, | |
| "repeat_examples": false, | |
| "note": "2EP is physical concat; do not recycle via repeat_examples" | |
| }, | |
| "reproducibility": { | |
| "seed": 42 | |
| }, | |
| "runner": { | |
| "path": "/workspace/tools/rstar_dual_worker_v4.py", | |
| "sha256": "97a298e9ee4f0bb571baa88c7d75285ade2ea2a8a9b5875b35db25b5db9b3842", | |
| "rewrite_forbidden": true | |
| }, | |
| "template": { | |
| "id": "olmo3-think", | |
| "mode": "think", | |
| "enable_thinking": true, | |
| "generation_prefill": false, | |
| "target_contains_full_think": true, | |
| "canonical_empty_think_pair_in_prompt": false, | |
| "empty_think_pair_in_loss": false, | |
| "target_forbids_think_tags": false, | |
| "olmo_nothink_empty_pair_equivalent": "Think pair lives in the target (no generation-prompt <think> prefill).", | |
| "chat_template_file": "templates/olmo3-lcb-noprefill.chat_template.jinja", | |
| "system_prompt_sha256": "no_explicit_system_use_pinned_olmo_template", | |
| "chat_template_sha256": "olmo3-lcb-noprefill", | |
| "target_tail": [ | |
| 100257 | |
| ], | |
| "evaluation_stop_ids": [ | |
| 100257, | |
| 100265 | |
| ], | |
| "eos_token_ids": [ | |
| 100257 | |
| ], | |
| "eos_token": "<|endoftext|>", | |
| "supervision_eos": 100257, | |
| "forbidden_label_ids": [ | |
| 100265 | |
| ] | |
| }, | |
| "eval": { | |
| "suite": "DEV256", | |
| "seed": 3407, | |
| "enable_thinking": true, | |
| "canonical_empty_think_pair": false, | |
| "generated_think_tags": null, | |
| "temperature": 0.6, | |
| "top_p": 0.95, | |
| "top_k": 20, | |
| "model_context": 32768, | |
| "max_actual": "ctx-prompt-64", | |
| "stop_ids": [ | |
| 100257, | |
| 100265 | |
| ], | |
| "base_must_reeval_same_mode": true, | |
| "primary_checkpoint": "2EP_FINAL_ONLY", | |
| "milestones": "appendix_only", | |
| "cap_rate": "report_only", | |
| "do_not_execute": true | |
| } | |
| } | |