Downloads · 30 days
11
1% of all-time downloads
friendshipkim/Qwen2.5-Math-1.5B-Scoring
Qwen2.5-Math-1.5B-Scoring is a machine learning model from friendshipkim. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This is a custom Qwen2 model with dual heads: 1. Language Model Head: Standard next-token prediction for text generation 2. Success Rate Head: Predicts a success probability score in [0, 1] for the sequence
Downloads · 30 days
11
1% of all-time downloads
All-time downloads
1.3K
Public
Parameters
1.5B
3.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.1 GB · 99%
From the Hugging Face model README
This is a custom Qwen2 model with dual heads:
This model is based on friendshipkim/Qwen2.5-Math-1.5B.
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load model with trust_remote_code=True
model = AutoModelForCausalLM.from_pretrained(
"friendshipkim/Qwen2.5-Math-1.5B-Scoring",
trust_remote_code=True,
torch_dtype="auto"
)
tokenizer = AutoTokenizer.from_pretrained("friendshipkim/Qwen2.5-Math-1.5B-Scoring")
# Example: Get both LM output and success score
prompt = "Question: What is 2+2?\nAnswer: 4"
inputs = tokenizer(prompt, return_tensors="pt")
# Get both outputs
lm_output, success_score = model(**inputs, return_score=True)
print(f"Success rate: {success_score.item():.3f}")
# Generate text (return_score=False for standard generation)
generated = model.generate(**inputs, max_length=50, return_score=False)
print(tokenizer.decode(generated[0]))
The success_rate_head is randomly initialized and needs to be fine-tuned on your task. The LM head and backbone are initialized from the base model.
This model uses a custom modeling file (modeling_custom.py) that extends Qwen2ForCausalLM.
The return_score parameter controls whether to compute the success rate:
return_score=True: Returns (lm_output, success_score)return_score=False: Returns lm_output only (for standard generation)