Text Generation
Transformers
Safetensors
olmo3
math
sft
lora
think
task-vector
iclr2027
conversational
Instructions to use modrill/math-think-o7b-20260908 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use modrill/math-think-o7b-20260908 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="modrill/math-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/math-think-o7b-20260908") model = AutoModelForCausalLM.from_pretrained("modrill/math-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/math-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/math-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/math-think-o7b-20260908", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/modrill/math-think-o7b-20260908
- SGLang
How to use modrill/math-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/math-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/math-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/math-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/math-think-o7b-20260908", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use modrill/math-think-o7b-20260908 with Docker Model Runner:
docker model run hf.co/modrill/math-think-o7b-20260908
File size: 3,929 Bytes
7fdfe05 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | {
"schema": "ddc-atomic-checkpoint-commit/1",
"runner_id": "THINK_B_2EP_SIX_ARMS_RUNNER_V3",
"completed_optimizer_updates": 987,
"cumulative_realized_active_tokens": 64632872,
"bindings": {
"config_sha256": "5c5965a584fe72804b4752efb2e27b010079eb50e0357eb288923d913e458fa4",
"runner_code_sha256": "fd6d1c6403810acc4460e2ce0fb5f4418881387b11f4bd21f7cd21067faa3a0a",
"config_schema_sha256": "d6d13eeee42bf04cf34fc68b2fa7a61b316c4543b77d7d779815b8eddf10c099",
"python_binary_sha256": "5700a6a7804feb44da6c963ebd1323982478b7ca57478e4e81981c47818453bd",
"environment_lock_sha256": "627d4fe088b8f64841b0520ae5bd9dc5c81e9dcd5969b4bd45c9a9910b2f3c01",
"base_composite_sha256": "526963d72561cb6244f60f751312673d2671111d214636ae571de0d62c762760",
"base_lock_sha256": "6791648e4030008388f2e9241b23771cb07eb0416fbd7bc3c6777c7c36bda3be",
"frozen_rows_sha256": "8221ff30de8fa345441e6002c111c948a3fdd20413e5c09e3a8f76cf26b12ef1",
"ordered_ids_sha256": "dde87a60437027a3e19566382b4ac25381f2888e45507bef0ddc3d6d284c412b",
"update_plan_sha256": "24e1f6fecc9e9e5b5c371c7041cbe0bf79dec48741caf8a60d50310984e59ef1",
"data_receipt_sha256": "e66346fb413557929ab53648bc656fb3102557cf3460abb49c7b1c6e7281420d",
"decontamination_receipt_sha256": "66c360871b06208ed20e473e57ad0f09c79e4dac1b3124a9461a5b729b487153",
"render_receipt_sha256": "e66346fb413557929ab53648bc656fb3102557cf3460abb49c7b1c6e7281420d",
"token_bake_sha256": "74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b",
"continuation_sha256": "74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b"
},
"trainer_state": {
"path": "trainer_state.pt",
"bytes": 1919557677,
"sha256": "1ecc81d3f7ee1f1acffd3a9cba3ccf42de56b7bc476571a1b928dee3d2d7058b"
},
"token_boundary_ledger": {
"path": "TOKEN_BOUNDARY_LEDGER.json",
"bytes": 970601,
"sha256": "bbf8fc19c70dc5bab6b95bfd8799a022599968157ab72f4e3dc0c1f196e74a4b"
},
"adapter_files": [
{
"path": "adapter/README.md",
"bytes": 5282,
"sha256": "45145483fe203512c1f26bd8675f16875cc326c7cfe5e3020cdf0f50f297acf2"
},
{
"path": "adapter/adapter_config.json",
"bytes": 1276,
"sha256": "b0b7fe4369c25edd35ad553eb42a78160c4317ba719fbc1ece7cf824dae037bb"
},
{
"path": "adapter/adapter_model.safetensors",
"bytes": 639724904,
"sha256": "9da5899df6a1d6d7cfb9e412085eed9a85693bd0fd848645b176e34deed0d8e2"
}
],
"serialization_canary": {
"save_load_format": "safetensors",
"state_key_count": 450,
"token_state": {
"schema": "think-b-2ep-token-rows/1",
"tensors": [
{
"key": "base_model.model.lm_head.token_adapter.trainable_tokens_delta",
"sha256": "037ef35dc1d9a3f53df04a14fc8f4c259ae071ac569f124410b850e091ada551",
"shape": [
1,
4096
],
"dtype": "torch.float32"
},
{
"key": "base_model.model.model.embed_tokens.token_adapter.trainable_tokens_delta",
"sha256": "1f1a38b5c91a31be7cc7cd0f4dded40c8cb9781f2ceaefda73c2eb5e2d52e899",
"shape": [
1,
4096
],
"dtype": "torch.float32"
}
]
}
},
"token_state": {
"schema": "think-b-2ep-token-rows/1",
"tensors": [
{
"key": "base_model.model.lm_head.token_adapter.trainable_tokens_delta",
"sha256": "037ef35dc1d9a3f53df04a14fc8f4c259ae071ac569f124410b850e091ada551",
"shape": [
1,
4096
],
"dtype": "torch.float32"
},
{
"key": "base_model.model.model.embed_tokens.token_adapter.trainable_tokens_delta",
"sha256": "1f1a38b5c91a31be7cc7cd0f4dded40c8cb9781f2ceaefda73c2eb5e2d52e899",
"shape": [
1,
4096
],
"dtype": "torch.float32"
}
]
}
}
|