Text Generation
Transformers
Safetensors
qwen3
refiner
grpo
rl
rubric
conversational
text-generation-inference
Instructions to use lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50") model = AutoModelForCausalLM.from_pretrained("lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50
- SGLang
How to use lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50 with Docker Model Runner:
docker model run hf.co/lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50
qwen3-4B-refiner-rubric-rl-step50
This model is a GRPO-trained checkpoint (step 50) of the Qwen3-4B refiner, fine-tuned with reinforcement learning using per-instance rubric rewards.
- Experiment name:
instance-rubric-rl-5e-6-answer_only
Training Details
- Base model:
lihaoxin2020/qwen3-4B-refiner-sft-step-3201 - Training method: GRPO (Group Relative Policy Optimization) with DeepSpeed Stage 3
- Refiner mode:
answer_only - Training script:
open_instruct/grpo_fast_refiner_rubric.py
Hyperparameters
| Parameter | Value |
|---|---|
| Learning rate | 5e-6 |
| LR scheduler | constant |
| Beta (KL penalty) | 0.001 |
| KL estimator | kl3 |
| Advantage normalization | standard |
| Samples per prompt (rollout) | 8 |
| Unique prompts per rollout | 32 |
| Mini batches | 1 |
| Epochs per batch | 1 |
| Per-device train batch size | 1 |
| Temperature | 1.0 |
| Seed | 42 |
| Async mode | true |
| Adam offload | true |
| vLLM sync backend | nccl |
Sequence Lengths
| Parameter | Value |
|---|---|
| Max token length | 8192 |
| Max prompt token length | 6144 |
| Response length | 1024 |
| Pack length | 8192 |
Reward Configuration
| Parameter | Value |
|---|---|
| Verification reward | 10.0 |
| Non-stop penalty | false |
| Gate judge score with format bonus | true |
| Apply paper citation reward | true |
| Paper citation weight | 0.2 |
Dataset
- Training:
lihaoxin2020/rl_hard_gpt5_sft(split: train) - Evaluation:
lihaoxin2020/rl_hard_gpt5_sft(16 samples, split: train)
Infrastructure
- DeepSpeed stage: 3
- Learners per node: 1
- vLLM engines: 1
- vLLM tensor parallel size: 1
- vLLM GPU memory utilization: 0.90
- Judge model:
Qwen/Qwen3.5-35B-A3B(via vLLM)
- Downloads last month
- 8
Model tree for lihaoxin2020/qwen3-4B-refiner-rubric-rl-step50
Base model
lihaoxin2020/qwen3-4B-refiner-sft-step-3201