/ Модель

Характеристики

Контекст
4 096 токенов
Параметры
7,1 млрд
Размер весов
15,2 ГБ
Лицензия
MIT
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-Math-7B-Instruct
Библиотека
transformers
Опубликована
26 мая 2025

PathFinder-PRM-7B

Генерация текстаТекст → текст3 профессии

Дискриминативная модель для оценки корректности и логической согласованности шагов математических рассуждений на английском языке.

100скачиваний за 30 дней5лайковвеса обновлены27 мая 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

PathFinder-PRM-7B — дискриминативная модель оценки промежуточных шагов математических рассуждений, разработанная авторами проекта Declare Lab и дообученная на Qwen/Qwen2.5-Math-7B-Instruct. Она отдельно оценивает математическую корректность и логическую согласованность шагов, а затем объединяет эти оценки для проверки хода решения и итогового ответа. Модель рассчитана на английский язык.

Модель использует плотную архитектуру Qwen2 и содержит 7,1 млрд параметров; контекст составляет 4096 токенов. Её применяют для поиска ошибок в цепочках математических рассуждений, сравнения вариантов решения и направления генерации ответов с помощью оценок вознаграждения. В README указано обучение на человеческих аннотациях PRM800K и автоматически размеченных примерах, а также оценка на ProcessBench, PRMBench и математических задачах. Лицензия — MIT.

Это оценщик рассуждений, а не обычная модель для генерации математических ответов. Её оценки могут помогать выбирать более качественные решения, но не гарантируют математическую корректность; заявленные результаты зависят от тестовых наборов и используемой модели-генератора.

Сценарии применения

  • поиск математических ошибок в пошаговом решении
  • оценка логической согласованности цепочки рассуждений
  • ранжирование альтернативных решений математической задачи
  • направление генерации решения с помощью оценок вознаграждения

Ограничения

Модель оценивает шаги рассуждения, а не гарантирует правильность итогового ответа; заявленные показатели относятся к описанным в карточке тестам и сценариям. Английский указан как поддерживаемый язык, поэтому перенос результатов на другие языки не подтверждён.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

PathFinder-PRM-7B

Introduction

PathFinder-PRM-7B is a hierarchical discriminative Process Reward Model (PRM) designed to identify errors and reward correct math reasoning in multi-step outputs from large language models (LLMs). Instead of treating evaluation as a single correct-or-wrong decision, PathFinder-PRM-7B breaks down its error judgment into 2 parts: whether the reasoning is mathematically correct, and logically consistent. It predicts these aspects separately and then combines them to decide if the current reasoning steps leads to a correct final solution. PathFinder-PRM-7B is trained on a combination of high-quality human annotated data (PRM800K) and additional automatically annotated samples, enabling robustness to common failure patterns and strong generalization across diverse benchmarks such as ProcessBench and PRMBench.

Model Details

Model Description

  • Model type: Process Reward Model
  • Language(s) (NLP): English
  • License: MIT
  • Finetuned from model: Qwen/Qwen2.5-Math-7B-Instruct

Model Sources

For more details, please refer to our paper and Github repository.

Usage

🤗 Hugging Face Transformers

Here we show a code snippet to show you how to use the PathFinder-PRM-7B with transformers:

import torch
from transformers import AutoModel, AutoTokenizer
import torch.nn.functional as F

model_name = "declare-lab/PathFinder-PRM-7B"
device = "auto"

PROMPT_PREFIX = "You are a Math Teacher. Given a question and a student's solution, evaluate the mathemetical correctness, logic consistency of the current step and whether it will lead to the correct final solution"

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)

model = AutoModel.from_pretrained(
    model_name, 
    device_map=device, 
    torch_dtype=torch.bfloat16,
    trust_remote_code=True,
    attn_implementation = "flash_attention_2",
).eval()

pos_token_id = tokenizer.encode("<+>")[0]
neg_token_id = tokenizer.encode("<->")[0]

def run_inference(sample_input):

    message_ids = tokenizer.apply_chat_template(
        sample_input,
        tokenize=True,
        return_dict=True,
        return_tensors='pt'
        ).to(model.device)

    mask_token_id = tokenizer.encode("<extra>")[0]
    token_masks = (message_ids['input_ids'] == mask_token_id)

    shifted_mask = torch.cat(
        [
            token_masks[:, 1:], 
            torch.zeros(token_masks.size(0), 1, dtype=torch.bool, device=model.device)
        ], 
        dim=1
        )

    # 1st Forward Pass
    with torch.no_grad():
        outputs = model(**message_ids)

    allowed_token_ids = torch.tensor([pos_token_id, neg_token_id], device=outputs.logits.device)

    masked_logits = outputs.logits[shifted_mask][:, allowed_token_ids]
    predicted_indices = masked_logits.argmax(dim=-1)
    predicted_tokens = allowed_token_ids[predicted_indices]

    decoded_tokens = [tokenizer.decode([int(token_id)], skip_special_tokens=False) for token_id in predicted_tokens]

    if '<->' in decoded_tokens:
        # error found in step
        return -1

    # preparing input for 2nd Forward Pass
    new_messages = sample_input.copy()

    asst_response = new_messages[-1]['content']

    # replacing mask tokens with pred tokens for math and consistency
    for pred in decoded_tokens:
        asst_response = asst_response.replace("<extra>", pred, 1)

    asst_response += ', Correctness: <extra>'

    new_messages[-1]['content'] = asst_response
    
    new_message_ids = tokenizer.apply_chat_template(
        new_messages,
        tokenize=True,
        return_dict=True,
        return_tensors='pt'
        ).to(model.device)

    token_masks = (new_message_ids['input_ids'] == mask_token_id)

    shifted_mask = torch.cat(
        [
            token_masks[:, 1:], 
            torch.zeros(token_masks.size(0), 1, dtype=torch.bool, device=model.device)
        ], 
        dim=1
        )

    # 2nd Forward Pass
    with torch.no_grad():
        outputs = model(**new_message_ids)

    masked_logits = outputs.logits[shifted_mask]

    restricted_logits = masked_logits[:, [pos_token_id, neg_token_id]]   

    probs_pos_neg  = F.softmax(restricted_logits, dim=-1)

    return probs_pos_neg[0][0].cpu().item()

question = "Sue lives in a fun neighborhood.  One weekend, the neighbors decided to play a prank on Sue.  On Friday morning, the neighbors placed 18 pink plastic flamingos out on Sue's front yard.  On Saturday morning, the neighbors took back one third of the flamingos, painted them white, and put these newly painted white flamingos back out on Sue's front yard.  Then, on Sunday morning, they added another 18 pink plastic flamingos to the collection. At noon on Sunday, how many more pink plastic flamingos were out than white plastic flamingos?"

prev_steps = [ "To find out how many more pink plastic flamingos were out than white plastic flamingos at noon on Sunday, we can break down the problem into steps. First, on Friday, the neighbors start with 18 pink plastic flamingos.",
      "On Saturday, they take back one third of the flamingos. Since there were 18 flamingos, (1/3 \\times 18 = 6) flamingos are taken back. So, they have (18 - 6 = 12) flamingos left in their possession. Then, they paint these 6 flamingos white and put them back out on Sue's front yard. Now, Sue has the original 12 pink flamingos plus the 6 new white ones. Thus, by the end of Saturday, Sue has (12 + 6 = 18) pink flamingos and 6 white flamingos.",
      "On Sunday, the neighbors add another 18 pink plastic flamingos to Sue's front yard. By the end of Sunday morning, Sue has (18 + 18 = 36) pink flamingos and still 6 white flamingos."]

curr_step =  "To find the difference, subtract the number of white flamingos from the number of pink flamingos: (36 - 6 = 30). Therefore, at noon on Sunday, there were 30 more pink plastic flamingos out than white plastic flamingos. The answer is (\\boxed{30})."

prev_steps_str = "\n\n".join(prev_steps)
messages = [
    {"role": "user", "content": PROMPT_PREFIX + "\n\n Question: "+ question},
    {"role": "assistant", "content": prev_steps_str + "\n\nCurrent Step: " + now_step +" Math reasoning: <extra>, Consistency: <extra>"},
]

reward_score = run_inference(messages)

Evaluation

Evalaution Benchmarks

Results

benchmark_comparison.png

PRMBench Results

ModelSimplicitySoundnessSensitivityOverall
LLM-as-judge, Proprietary Language Models
Gemini-2.0-thinking-exp-121966.271.875.368.8
GPT-4o59.770.975.866.8
LLM-as-judge, Open-source Language Models
Qwen-2.5-Math-72B55.161.167.157.4
QwQ-Preview-32B56.468.273.563.6
Discriminative Process Reward Models
Math-Shepherd-7B47.145.760.747.0
Math-PSA-7B51.351.864.952.3
RLHFlow-Mistral-8B46.757.568.554.4
Lemma-PRM800k-7B51.450.966.052.0
ReasonEval-7B55.563.971.060.0
Qwen2.5-Math-PRM-7B52.171.075.565.5
🟢 PathFinder-PRM-7B58.970.876.967.7

Note: Simplicity, Soundness, and Sensitivity are averaged sub-metrics from PRMBench. Our model, PathFinder-PRM-7B, outperforms all open-source discriminative PRMs and LLM-as-judge models, while achieving competitive performance compared to large proprietary models.

ProcessBench Results

Model# SamplesGSM8KMATHOlympiadOmniMathAvg. F1
Math-Shepherd-7B445K47.929.524.823.831.5
RLHFlow-Mistral-8B273K50.433.413.815.828.4
Llemma-PRM800K-7B~350K48.443.128.533.438.4
Qwen2.5-Math-7B-PRM800K264K68.262.650.744.358.5
🟢 PathFinder-PRM-7B~400K77.975.365.059.769.5
Qwen2.5-Math-PRM-7B~1.5M82.477.667.566.373.5

PathFinder-PRM-7B outperforms models trained on similar data sizes on ProcessBench but performs 4 points worse compared to Qwen2.5-Math-PRM-7B which was trained with 3x more data.

Reward-Guided Greedy Search (PRM@8)

ModelAIME24AMC23MATHOlympiadCollegeMinervaAvg
Math-Shepherd-7B13.352.574.638.536.541.242.8
Math-PSA-7B6.757.579.842.541.039.344.5
Skywork-PRM-7B10.057.577.841.539.043.444.9
Qwen2.5-Math-PRM-7B16.760.081.043.539.040.446.8
🟢 PathFinder-PRM-7B20.062.578.836.555.036.748.3

Note: All results are computed using reward-guided greedy search with Qwen2.5‑7B‑Instruct as the policy model. PathFinder-PRM-7B, outperforms all open-source discriminative PRMs in Reward-Guided Greedy Search showcasing its ability to better guide policy models towards correct solutions

Citation

@misc{pala2025errortypingsmarterrewards,
      title={Error Typing for Smarter Rewards: Improving Process Reward Models with Error-Aware Hierarchical Supervision}, 
      author={Tej Deep Pala and Panshul Sharma and Amir Zadeh and Chuan Li and Soujanya Poria},
      year={2025},
      eprint={2505.19706},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2505.19706}, 
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
84a7412

0 моделей