This repository contains LoRA adapter checkpoints trained with PRIME (Process Reinforcement through Implicit Rewards) integrated into the GRPO framework on the Open-RS2 dataset.
Method Overview
We integrate PRIME's implicit process reward model (PRM) into Tina's GRPO + LoRA training pipeline. The key idea is to provide token-level dense rewards in addition to the sparse outcome reward (correct/incorrect), enabling better credit assignment during RL training.
1from vllm import LLM, SamplingParams
23# After merging and saving to a local directory4llm = LLM(model="path/to/merged_model", dtype="bfloat16", max_model_len=32768)5sampling = SamplingParams(max_tokens=32768, temperature=0.6, top_p=0.95)67prompt ="Solve: What is the sum of all positive integers n such that n^2 - 19n + 99 is a perfect square?"8messages =[{"role":"user","content": prompt}]9formatted = llm.get_tokenizer().apply_chat_template(messages, tokenize=False, add_generation_prompt=True)10output = llm.generate([formatted], sampling)11print(output[0].outputs[0].text)