RC-OPD-4B

RC-OPD LoRA adapter for Qwen/Qwen3-4B, trained with targeted feedback on reasoning errors for mathematical reasoning.

Project collection · Project overview

This repository contains the adapter only. Load the matching base model and tokenizer separately.

Loading

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_id = "Qwen/Qwen3-4B"
adapter_id = "starrylay/RC-OPD-4B"

tokenizer = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForCausalLM.from_pretrained(
    base_id, torch_dtype="auto", device_map="auto",
)
model = PeftModel.from_pretrained(base, adapter_id)
model.eval()

Evaluation results

Scores are Avg@4 accuracy (%). Each benchmark contains 30 problems, with four generated solutions per problem (120 solutions per benchmark). Results are copied unchanged from the original release, where they were checked against the saved evaluation outputs and per-generation correctness labels; evaluation was not rerun for this migration.

AIME24 AIME25 HMMT25 Mean
78.33 69.17 50.83 66.11

Avg@4 (%) = 100 × total correct generated solutions / (30 × 4). Mean is computed across the three benchmarks before rounding. These scores are not Pass@4 or majority-vote accuracy.

Evaluation prompt

Each problem is submitted as a single user message with the exact following content:

{problem}

Please reason step by step, and put your final answer within \boxed{}.

{problem} is replaced by the benchmark problem text. There is no additional system message or few-shot example. The user message is formatted using the matching Qwen3 tokenizer's chat template:

messages = [{
    "role": "user",
    "content": problem + "\n\nPlease reason step by step, and put your final answer within \\boxed{}.",
}]
prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=True,
)

Decoding and scoring

Parameter Value
Inference engine vLLM with the selected LoRA adapter
Thinking mode Enabled
Samples per problem (n / val_n) 4
Temperature 1.0
top_p 0.95
top_k -1 (disabled)
min_p 0.0
Presence penalty 0.0
Maximum generated tokens 38,912
Maximum context length 40,960

Dataset identifiers in the evaluation implementation are HuggingFaceH4/aime_2024, yentinglin/aime_2025, and MathArena/hmmt_feb_2025. Each contributes its full 30-problem set; the loader uses the dataset's train split label for these benchmark questions.

Scoring follows the original OPSD evaluator: extract the final \boxed{...} answer and check it with math_verify. If the verifier raises an exception, the evaluator falls back to normalized string comparison. A missing boxed answer is scored incorrect. These reported results use this evaluator without additional LLM regrading.

Files and integrity

adapter_model.safetensors and adapter_config.json are available at the repository root for direct PEFT loading. Both files are byte-for-byte identical to the original release. checkpoint_manifest.json records their sizes, SHA256 hashes, and source revision.

Other sizes

RC-OPD-1.7B · RC-OPD-4B · RC-OPD-8B

Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for starrylay/RC-OPD-4B

Finetuned
Qwen/Qwen3-4B
Adapter
(1185)
this model

Collection including starrylay/RC-OPD-4B