RC-OPD-8B

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

Project collection · Benchmark guide

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

Loading

This PEFT snippet demonstrates loading only. For the reported benchmark protocol, use the versioned benchmark package. Transformers/PEFT, merged weights and different TP settings are different inference paths.

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

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

base_revision = "b968826d9c46dd6066d109eabc6255188de91218"
adapter_revision = "cff9361e14ce3ae350c506d8a8e085b46082ad55"

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

Reproduce the benchmark

This repository now includes a self-contained, inference-only benchmark package: exact dataset sources and row hashes, pinned base/tokenizer and adapter files, environment constraints, evaluation/scoring code, and reference scores. No teacher/API service is needed.

hf download starrylay/RC-OPD-8B --revision benchmark-v1-20261016 \
  --include "benchmark/*" --local-dir rcopd-8b-benchmark
cd rcopd-8b-benchmark
# Install dependencies as described in benchmark/README.md first.
CUDA_VISIBLE_DEVICES=0,1,2 python benchmark/run.py \
  --download-base --dataset all --output results/rcopd-8b-all

The 8B historical profile uses TP1. 8B additionally uses three interleaved shards for each AIME dataset, two for HMMT25, and max_num_seqs=8 per shard. Running the full 30 questions in one unconstrained worker is a different execution profile.

The script verifies file identity and all benchmark questions before inference, then records actual precision, sampling, prompt IDs and generation IDs. Datasets run sequentially for portability; historical cross-dataset placement/timing is documented separately. Historical scores below are observations, not exact-output or minimum-score guarantees.

This update adds identity, data, profile and scoring validation. It does not claim a new full generation rerun or a stable-score guarantee for this model size.

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 76.67 45.83 66.94

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
22
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for starrylay/RC-OPD-8B

Finetuned
Qwen/Qwen3-8B
Adapter
(2333)
this model

Collection including starrylay/RC-OPD-8B