Text Classification
Transformers
Safetensors
English
Chinese
qwen2
feature-extraction
reward model
custom_code
text-embeddings-inference
Instructions to use Qwen/Qwen2.5-Math-PRM-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qwen/Qwen2.5-Math-PRM-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Qwen/Qwen2.5-Math-PRM-7B", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Math-PRM-7B", trust_remote_code=True) model = AutoModel.from_pretrained("Qwen/Qwen2.5-Math-PRM-7B", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Ask questions about training data construction
#8
by zzzzz2023 - opened
Hello, I have seen the code of your model. I would like to know the construction way of label in training, and how to better calculate the loss by process reward.@Zhenru Thank you for your answer
loss in the model code is calculated as loss_fct(logits.view(-1, self.num_labels), labels.view(-1)),But here the logits are the probabilities of tokens in the assistant, how should labels be constructed and logits directly calculate the cross entropy