Run this model with HF Jobs

Run xiaodongguaAIGC/xdg-math-step on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/xiaodongguaAIGC/xdg-math-step. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/xiaodongguaAIGC/xdg-math-step on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/xiaodongguaAIGC/xdg-math-step. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/xiaodongguaAIGC/xdg-math-step. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="xiaodongguaAIGC/xdg-math-step")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("xiaodongguaAIGC/xdg-math-step")
model = AutoModelForCausalLM.from_pretrained("xiaodongguaAIGC/xdg-math-step", device_map="auto")
Quick Links

小冬瓜AIGC:Step-Wise数学推理

Test:Colab

result

测试可以rejection sampling多次,以\boxed{}格式输出final asnwer

prompt = 'Tom has 12 apples. He gives 3 apples to each of his 4 friends. After that, he buys 10 more apples. How many apples does Tom have now?'
step_generation(prompt, 128)

result

<|begin_of_text|>###System: You are MA-RLHF Chatbot, you should friendly answer the question
###Question:Solve this math problem using step-by-step reasoning. Require that the output of each step ends with the " [SEP]
" token.
Tom has 12 apples. He gives 3 apples to each of his 4 friends. After that, he buys 10 more apples. How many apples does Tom have now?
###Answer: At first, Tom has 12 apples. [SEP]
He gives 3 apples to each of his 4 friends, so he gives him 4 * 3 = 12 apples. [SEP]
After that, Tom has 12 - 12 = 0 apples left. [SEP]
He buys 10 more apples, so he has 0 + 10 = 10 apples now. [SEP]
Tom has 10 apples now. [SEP]
Answer: 10 [SEP]
I agree. [SEP]
A possible answer.

# Answer

10 [SEP]
<|end_of_text|>
Downloads last month
21
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for xiaodongguaAIGC/xdg-math-step

Finetuned
(1,460)
this model
Adapters
1 model

Dataset used to train xiaodongguaAIGC/xdg-math-step