Instructions to use HerrHruby/MR_midtrain_9B_v4_half with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HerrHruby/MR_midtrain_9B_v4_half with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HerrHruby/MR_midtrain_9B_v4_half") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HerrHruby/MR_midtrain_9B_v4_half") model = AutoModelForCausalLM.from_pretrained("HerrHruby/MR_midtrain_9B_v4_half", 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 HerrHruby/MR_midtrain_9B_v4_half with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HerrHruby/MR_midtrain_9B_v4_half" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HerrHruby/MR_midtrain_9B_v4_half", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HerrHruby/MR_midtrain_9B_v4_half
- SGLang
How to use HerrHruby/MR_midtrain_9B_v4_half 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 "HerrHruby/MR_midtrain_9B_v4_half" \ --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": "HerrHruby/MR_midtrain_9B_v4_half", "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 "HerrHruby/MR_midtrain_9B_v4_half" \ --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": "HerrHruby/MR_midtrain_9B_v4_half", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HerrHruby/MR_midtrain_9B_v4_half with Docker Model Runner:
docker model run hf.co/HerrHruby/MR_midtrain_9B_v4_half
MR_midtrain_9B_v4 — half corpus
A data-scaling point for MR_midtrain_9B_v4:
the same v4 midtrain SFT recipe on 37,404 rows / 2,244 problems, which is
the half of the full corpus
(MR_midtrain_V4_sft,
74,796 rows / 4,518 problems).
Scaling result
| corpus | rows | problems | converged val loss |
|---|---|---|---|
| full | 74,796 | 4,518 | 0.6444 |
| half | 37,404 | 2,244 | 0.6586 |
| quarter | 18,714 | 1,095 | 0.6734 |
All three lie on val_loss = 0.6444 + 0.0145 * log2(74796/rows) to within
0.0003 — each halving of the corpus costs ~0.0145 val loss, log-linear across
the whole 4x range with no threshold.
This is held-out next-token loss, not a judged score. Scaffold-eval numbers for these checkpoints are not yet measured.
Corpus construction
Scaling points are nested (quarter ⊂ half ⊂ full), split by problem rather than by row: rows within a problem are different layers of one exploration, so a row-level split would keep nearly every problem and measure intra-trajectory redundancy instead of corpus size. The validation set is byte-identical at every point.
Training
Identical to the reference run except corpus size: Qwen3.5-9B + 4 MR special tokens, bf16 FSDP, max_length 65536, effective batch 128, lr 2e-5 cosine to 0.01x, warmup 3%, weight decay 0.01, 6 epochs. Stopped at step 1600 of 1752 (91.3% through the cosine schedule, lr ~5.7e-7 vs a final 2.0e-7) because val loss had been flat to four decimals for 300 steps and the remaining allocation was better spent on the quarter run.
Uses the same <direction> / <summary> scaffold protocol as v4 — see the
base model card for the prompt format.
- Downloads last month
- -