Instructions to use suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80") model = AutoModelForCausalLM.from_pretrained("suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80", 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 suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80
- SGLang
How to use suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80 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 "suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80" \ --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": "suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80", "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 "suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80" \ --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": "suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80 with Docker Model Runner:
docker model run hf.co/suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80
IncorrectTraceSFT · MATH random mask 80
A full fine-tune of Qwen2.5-7B from How Should Incorrect Traces Be Used in Supervised Fine-Tuning? This checkpoint is the random_mask_80 condition in the math masking experiment.
Code and reproduction instructions · Training data
Training
The student starts from Qwen/Qwen2.5-7B, revision d149729398750b98c0af14eb82c78cfe92750796. Training uses SLIME with Megatron-LM, BF16, global batch size 64, and AdamW with a peak learning rate of 5e-6. Full settings and exact data selections are in the code repository.
This is the final checkpoint after 125 optimizer updates. The original checkpoint identifier is 90c8d56ea488b6d7d5e0433fc3b11f1b154b2fd9451a6e50e560622e6c580d76.
Evaluate
From a checkout of the code repository with evaluation dependencies installed:
python -m incorrect_trace_sft.evaluate --experiment math_masking --model suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80 --output runs/MATH-random-mask-80
The evaluation command preserves the experiment's prompts, context limit, sampling parameters, and answer scorer. It reports pass@1 and the Monte Carlo standard error across decoding repeats. See the repository's results table for all conditions and comparisons.
Files and intended use
The safetensors weights are unchanged from the evaluated checkpoint. provenance.json records their original SHA-256 hashes. The tokenizer configuration has been normalized for Transformers 4.57: legacy special-token metadata is represented using the current field format, and the existing chat template is embedded. Vocabulary, token IDs, and the chat template are unchanged.
This model is released for research on mathematical reasoning and SFT data selection. Correct final answers in the training data do not imply that intermediate reasoning steps were verified. ID/OOD in this study refers to problem identity relative to SFT; it says nothing about pretraining exposure. Coding-agent checkpoints will be released separately.
- Downloads last month
- 225
Model tree for suryadv/IncorrectTraceSFT-Qwen2.5-7B-MATH-random-mask-80
Base model
Qwen/Qwen2.5-7B