Run this model inference on single tenant GPU with unmatched speed and reliability at scale.
Run this model inference with full control and performance in your environment.
Get help setting up a custom Dedicated Endpoints.
Talk with our engineer to get a quote for reserved GPU instances with discounts.
README
Training
- Method: TRL
SFTTrainer - Dataset split:
train - Training rows: 50944
- Epochs: 2
- Max sequence length: 1024
- Target style: full generated response
- Format: the base tokenizer chat template via
tokenizer.apply_chat_template - System prompt:
You are a math-focused assistant. Solve the user's math problem and follow the training format: Understanding Query, Drafting Answer, Refining The Answer, and Final Response. - Weighted loss: enabled
- Final-response token weight: 2.0
- Number-token weight: 2.0
Format
Each row is formatted with:
python
messages = [{"role": "system", "content": SYSTEM_PROMPT},{"role": "user", "content": prompt},]prompt_text = tokenizer.apply_chat_template(messages,tokenize=False,add_generation_prompt=True,)training_text = prompt_text + response + (tokenizer.eos_token or "")
Important limitation
This model is trained on generated math-style data. Responses may contain incorrect arithmetic or flawed reasoning, and should not be treated as reliable mathematical answers without independent verification.
Usage
python
from transformers import AutoModelForCausalLM, AutoTokenizermodel_id = "User01110/supra-1.5-50M-MathMini"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id)messages = [{"role": "system", "content": "You are a math-focused assistant. Solve the user's math problem and follow the training format: Understanding Query, Drafting Answer, Refining The Answer, and Final Response."},{"role": "user", "content": "John has 22 apples, he eats 10 of them, now john has"},]prompt = tokenizer.apply_chat_template(messages,tokenize=False,add_generation_prompt=True,)inputs = tokenizer(prompt, return_tensors="pt")outputs = model.generate(**inputs,max_new_tokens=128,do_sample=True,temperature=0.7,top_k=40,top_p=0.95,repetition_penalty=1.1,pad_token_id=tokenizer.pad_token_id,eos_token_id=tokenizer.eos_token_id,)print(tokenizer.decode(outputs[0], skip_special_tokens=False))
Model provider
User01110
Model tree
Base
SupraLabs/Supra-1.5-50M-Instruct-exp
Fine-tuned
this model
Modalities
Input
Text
Output
Text
Pricing
Dedicated Endpoints
View detailsSupported Functionality
Model APIs
Dedicated Endpoints
Container
More information