Views
No views yet

1from transformers import AutoTokenizer
2from vllm import LLM, SamplingParams
3
4# Load model and tokenizer
5model = LLM(model="GenPRM/GenPRM-32B")
6tokenizer = AutoTokenizer.from_pretrained("GenPRM/GenPRM-32B")
7
8# Configure sampling parameters
9sampling_params = SamplingParams(
10 temperature=0.6,
11 top_p=0.95,
12 max_tokens=8192,
13 top_k=20,
14 repetition_penalty=1.0
15)
16
17# Define the messages
18messages = [
19 {'role': 'system', 'content': 'You are a math teacher. Your task is to review and critique the paragraphs in solution step by step.'},
20 {'role': 'user', 'content': 'Question: Let $f(x)=x^2-7x+18$ and let $g(f(x))=2x+3$. What is the sum of all possible values of $g(8)$?\n\nTo solve the problem, we need to first understand the given functions and how they interact with each other. We are given $f(x) = x^2 - 7x + 18$ and $g(f(x)) = 2x + 3$.'}
21]
22
23# Generate prompt and get the model's output
24prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
25outputs = model.generate(prompt, sampling_params)
26
27# Print result
28print(f"Model output for the first solution step: {outputs[0].outputs[0].text}")1@article{zhao2025genprm,
2 title = {GenPRM: Scaling Test-Time Compute of Process Reward Models via Generative Reasoning},
3 author = {Jian Zhao and Runze Liu and Kaiyan Zhang and Zhimu Zhou and Junqi Gao and Dong Li and Jiafei Lyu and Zhouyi Qian and Biqing Qi and Xiu Li and Bowen Zhou},
4 journal = {arXiv preprint arXiv:2504.00891},
5 year = {2025}
6}1@misc{Awesome-Process-Reward-Models,
2 title = {Awesome Process Reward Models},
3 author = {Runze Liu and Jian Zhao and Kaiyan Zhang and Zhimu Zhou and Junqi Gao and Dong Li and Jiafei Lyu and Zhouyi Qian and Biqing Qi and Xiu Li and Bowen Zhou},
4 howpublished = {\url{https://github.com/RyanLiu112/Awesome-Process-Reward-Models}},
5 note = {GitHub repository},
6 year = {2025}
7}1@article{liu2025can,
2 title = {Can 1B LLM Surpass 405B LLM? Rethinking Compute-Optimal Test-Time Scaling},
3 author = {Runze Liu and Junqi Gao and Jian Zhao and Kaiyan Zhang and Xiu Li and Biqing Qi and Wanli Ouyang and Bowen Zhou},
4 journal = {arXiv preprint arXiv:2502.06703},
5 year = {2025}
6}