Instructions to use NotoriousH2/Qwen3-4B-Countdown-RLVR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NotoriousH2/Qwen3-4B-Countdown-RLVR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NotoriousH2/Qwen3-4B-Countdown-RLVR") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NotoriousH2/Qwen3-4B-Countdown-RLVR") model = AutoModelForCausalLM.from_pretrained("NotoriousH2/Qwen3-4B-Countdown-RLVR", device_map="auto") 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 NotoriousH2/Qwen3-4B-Countdown-RLVR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NotoriousH2/Qwen3-4B-Countdown-RLVR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NotoriousH2/Qwen3-4B-Countdown-RLVR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NotoriousH2/Qwen3-4B-Countdown-RLVR
- SGLang
How to use NotoriousH2/Qwen3-4B-Countdown-RLVR 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 "NotoriousH2/Qwen3-4B-Countdown-RLVR" \ --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": "NotoriousH2/Qwen3-4B-Countdown-RLVR", "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 "NotoriousH2/Qwen3-4B-Countdown-RLVR" \ --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": "NotoriousH2/Qwen3-4B-Countdown-RLVR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NotoriousH2/Qwen3-4B-Countdown-RLVR with Docker Model Runner:
docker model run hf.co/NotoriousH2/Qwen3-4B-Countdown-RLVR
Qwen3-4B Countdown RLVR
이 모델은 Countdown 문제의 결정적 보상을 사용하여 Qwen3-4B를 GRPO로 학습한 병합 모델입니다.
숫자 4개를 각각 한 번 사용하고, 사칙연산으로 목표값을 만드는 수식을 생성합니다.
학습 데이터는 NotoriousH2/countdown-rlvr revision 257a0edd9e5ec3fed345c80d21d9c73d09995ecb를 사용했습니다.
1. 사용
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "NotoriousH2/Qwen3-4B-Countdown-RLVR"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
LoRA 파일과 토크나이저는 adapter/에 있습니다.
학습 설정은 training_config.json, 전체 학습 기록은 history.json에서 확인할 수 있습니다.
구간별 completion 길이와 체크포인트 재개 지점은 training_provenance.json에 있습니다.
검증 분할의 후보별 지표와 공개 체크포인트 선택 결과는 checkpoint_selection.json에 있습니다.
공개 병합 모델은 checkpoint-480을 사용합니다.
검증 평가는 서버 시드 42와 VLLM_BATCH_INVARIANT=1을 사용합니다.
test 평가는 서버 시드 42와 VLLM_BATCH_INVARIANT=1을 사용합니다.
2. 평가
Base와 RLVR 모델을 같은 test 분할과 생성 설정으로 평가했습니다.
| 모델 | pass@1 | pass@8 | 유효 수식 비율 | 평균 응답 토큰 |
|---|---|---|---|---|
| Base | 22.3% | 67.6% | 23.9% | 1664.0 |
| RLVR | 52.0% | 88.7% | 52.3% | 1666.2 |
문제별 응답과 점수는 evaluation.json에 있습니다.
3. 제한
평가 범위는 숫자 4개와 사칙연산으로 제한됩니다. 자유 형식 증명이나 수학적 추론 전반의 성능을 나타내지 않습니다.
4. 실제 출력 사례
학습 전후의 실제 응답을 선별한 사례는 learning_examples.json에 있습니다. Reasoning 응답은 모델이 생성한 think와 answer 태그를 포함한 원문을 보존합니다.
- Downloads last month
- 31