Instructions to use Balab2021/Qwen3.8-27B-Cricket-Reasoning-RLVR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Balab2021/Qwen3.8-27B-Cricket-Reasoning-RLVR with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B") model = PeftModel.from_pretrained(base_model, "Balab2021/Qwen3.8-27B-Cricket-Reasoning-RLVR") - Notebooks
- Google Colab
- Kaggle
Qwen3.8-27B cricket reasoning LoRA, trained with RLVR
LoRA adapter for Qwen/Qwen3.8-27B trained with reinforcement learning with verifiable rewards (RLVR) on questions
from Balab2021/CricketData-T20-Reasoning-Qwen3.8-Full. No reasoning traces were used as targets:
the model answered the questions itself and was rewarded only when its final number matched the exact answer.
Method
- Each step, the current policy answers questions in thinking mode, 8 samples per question, plain temperature-1 sampling, at most 1024 new tokens.
- Reward: finished and correct = 1 - 0.1 x tokens / 1024; wrong, no answer, or cut off = 0.
- Advantage: reward minus the mean reward of that question's samples. Loss: advantage x mean token negative log-likelihood of the sampled answer (policy gradient with a group baseline, one update per batch of fresh rollouts).
- 100 steps, 102,400 rollouts in total, 32 GPUs, learning rate 0.0001, LoRA r=32, alpha=64 on the language model's attention, Gated-DeltaNet and MLP projections.
- Training time: 1.3 hours on NVIDIA Vera Rubin GPUs.
Before and after
600 held-out benchmark questions, 4 samples each (temperature 1.0, top-p 0.95, top-k 20, up to 4,096 new tokens). "Before" is the base model, "after" is the base model with this adapter merged.
| question type | accuracy before | accuracy after | mean tokens before | mean tokens after | cut off before | cut off after |
|---|---|---|---|---|---|---|
| overall | 97.00% | 99.17% | 734 | 109 | 0.83% | 0.00% |
| run_rate | 98.75% | 99.75% | 394 | 86 | 0.12% | 0.00% |
| chase_rate | 93.62% | 97.75% | 950 | 157 | 1.00% | 0.00% |
| milestone | 98.62% | 100.00% | 858 | 83 | 1.38% | 0.00% |
During training (rollouts on training questions, average of the first and last 10 steps): accuracy 91.4% to 99.9%, mean tokens 330 to 100.
The benchmark covers three of the dataset's six question types.
Usage
import torch
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.8-27B")
model = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3.8-27B", dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, "Balab2021/Qwen3.8-27B-Cricket-Reasoning-RLVR")
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=True)
- Downloads last month
- 26
Model tree for Balab2021/Qwen3.8-27B-Cricket-Reasoning-RLVR
Base model
Qwen/Qwen3.8-27B