Instructions to use marianna13/prelude-9b-sft-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marianna13/prelude-9b-sft-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marianna13/prelude-9b-sft-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("marianna13/prelude-9b-sft-v2") model = AutoModelForCausalLM.from_pretrained("marianna13/prelude-9b-sft-v2", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use marianna13/prelude-9b-sft-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marianna13/prelude-9b-sft-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marianna13/prelude-9b-sft-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marianna13/prelude-9b-sft-v2
- SGLang
How to use marianna13/prelude-9b-sft-v2 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 "marianna13/prelude-9b-sft-v2" \ --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": "marianna13/prelude-9b-sft-v2", "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 "marianna13/prelude-9b-sft-v2" \ --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": "marianna13/prelude-9b-sft-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use marianna13/prelude-9b-sft-v2 with Docker Model Runner:
docker model run hf.co/marianna13/prelude-9b-sft-v2
Prelude 9B SFT v2 โ step9020
Supervised fine-tune of marianna13/prelude-9b-midtrain-v1 (revision stage4-128k-step1001: 128K context, YaRN
x2 over 64K, RoPE theta 9M). Qwen3 architecture, vocab 262,272, Prelude ChatML chat template (Qwen3-compatible:
<think> reasoning, hermes <tool_call> tool calls; enable_thinking=False prefills an empty think block).
Final checkpoint: Megatron iter 9020, one pass over the 37.7B-token SFT mix (intermediate exports are not published).
Data (37.69B tokens, 4.34M conversations, one pass, packed at 64K)
| Source | Rows | Tokens |
|---|---|---|
INTELLECT-3-SFT math (openreasoning_math, <= 4 traces per prompt) |
634,354 | 11.97B |
| INTELLECT-3-SFT code (<= 12 per prompt) | 406,380 | 6.91B |
| INTELLECT-3-SFT science (53% sample) | 847,922 | 5.48B |
INTELLECT-3-SFT chat + IF (am_chat, am_if) |
1,005,318 | 2.37B |
INTELLECT-3-SFT native tool calls (openreasoning_tool, toucan_tool) |
422,438 | 1.59B |
INTELLECT-3-SFT swe_swiss |
9,934 | 0.17B |
| open-thoughts/AgentTrove, Terminus-2 agent episodes (behavioural filter, teacher-balanced) | 595,509 | 7.29B (2.48B trained) |
| nebius/SWE-rebench-openhands-trajectories (native-tool SWE agent) | 20,256 | 1.04B (0.26B trained) |
| Thinking-off IF/chat (reasoning stripped, empty think block) | 398,253 | 0.89B |
Rows overlapping the eval sets and RL task pools were removed (decontamination by exact prompt keys).
Training
Megatron-Bridge on MareNostrum 5, 64 nodes, global batch 64 x 64K tokens, LR 2e-5 cosine, 9,020 steps (one pass).
Evaluation (main = step 9020)
| Benchmark | think on | think off |
|---|---|---|
| AIME24 / AIME25 | 54.3 / 43.3 | 50.3 / 37.0 |
| MATH500 | 84.6 | 78.2 |
| GPQA-Diamond | 51.2 | 45.6 |
| IFEval (prompt-level loose) | 77.3 | 74.9 |
| HumanEval+ | 80.8 | 65.6 |
| MultiPL-E (10 languages) | 46.9 | 46.2 |
| SWE-bench Verified (random 100), terminus-2 | 17.3 | |
| Terminal-Bench 2.1, terminus-2 | 3.0 | |
| TBLite (100), terminus-2 | 7.7 |
Evalchemy with a 32,768-token budget; thinking on sampled at T=0.6 / top-p 0.95, thinking off greedy. Agentic: mean
of 3 runs, thinking on, 3x timeouts. For the full comparison (Qwen3.5-9B-Base, Qwen3.5-9B, data-scaling steps) see
the rl/evals/prelude_midtrain/sft_v2_full_vs_qwen35.md table in the project monorepo.
Data scaling (intermediate exports of the same run, evaluated but not published):
| Checkpoint | AIME24 think | HumanEval+ think | IFEval think | SWE / TB2.1 / TBLite |
|---|---|---|---|---|
| step 500 (2.1B tok) | 36.3 | 68.3 | 71.0 | 14.0 / 1.9 / 6.0 |
| step 1000 (4.2B) | 41.0 | 70.1 | 70.0 | 12.3 / 1.9 / 6.7 |
| step 2500 (10.5B) | 46.0 | 72.0 | 73.4 | 14.7 / 1.9 / 7.7 |
| step 5000 (21.0B) | 48.0 | 78.0 | 75.8 | 16.0 / 3.4 / 8.3 |
| step 9020 (37.7B, this model) | 54.3 | 80.8 | 77.3 | 17.3 / 3.0 / 7.7 |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("marianna13/prelude-9b-sft-v2")
m = AutoModelForCausalLM.from_pretrained("marianna13/prelude-9b-sft-v2", torch_dtype="bfloat16")
ids = tok.apply_chat_template([{"role": "user", "content": "Hi"}], add_generation_prompt=True,
enable_thinking=True, return_tensors="pt")
Recommended sampling with thinking on: temperature 0.6, top-p 0.95 (greedy decoding often fails to close the reasoning). Research checkpoint; dataset licences follow the upstream sources listed above.
- Downloads last month
- 176
Model tree for marianna13/prelude-9b-sft-v2
Base model
marianna13/prelude-9b-midtrain-v1