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
license: apache-2.0
language:
- ko
library_name: transformers
pipeline_tag: text-generation
base_model: Qwen/Qwen3-4B
datasets:
- NotoriousH2/countdown-rlvr
tags:
- qwen3
- rlvr
- reasoning
- countdown
Qwen3-4B Countdown RLVR
μ΄ λͺ¨λΈμ Countdown λ¬Έμ μ λͺ
μμ μΈ μμ κ²μ¦ 보μμΌλ‘ Qwen3-4Bλ₯Ό GRPO νμ΅ν λ³ν© λͺ¨λΈμ
λλ€.
μ«μ 4κ°λ₯Ό κ°κ° ν λ² μ¬μ©νκ³ , μ¬μΉμ°μ°μΌλ‘ λͺ©νκ°μ λ§λλ μμμ μμ±ν©λλ€.
νμ΅ λ°μ΄ν°λ NotoriousH2/countdown-rlvr revision 257a0edd9e5ec3fed345c80d21d9c73d09995ecbλ₯Ό μ¬μ©νμ΅λλ€.
νμ΅μ 1~480 step μ 체μμ μ΅λ completion κΈΈμ΄ 3,072ν ν°μ μ¬μ©νμ΅λλ€. step 120μ νμ΅ μνλ₯Ό 볡μν΄ μ΄μ΄μ μ§ννμ΅λλ€.
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-360μ μ¬μ©ν©λλ€.
κ²μ¦ νκ°λ μλ² μλ 42μ VLLM_BATCH_INVARIANT=1μ μ¬μ©ν©λλ€.
test νκ°λ μλ² μλ 42μ VLLM_BATCH_INVARIANT=1μ μ¬μ©ν©λλ€.
2. νκ°
Baseμ RLVR λͺ¨λΈμ κ°μ test λΆν κ³Ό μμ± μ€μ μΌλ‘ νκ°νμ΅λλ€.
| λͺ¨λΈ | pass@1 | pass@8 | μ ν¨ μμ λΉμ¨ | νκ· μλ΅ ν ν° |
|---|---|---|---|---|
| Base | 15.2% | 52.7% | 14.1% | 1775.1 |
| RLVR | 57.4% | 88.7% | 56.8% | 1737.6 |
λ¬Έμ λ³ μλ΅κ³Ό μ μλ evaluation.jsonμ μμ΅λλ€.
3. μ ν
νκ° λ²μλ μ«μ 4κ°μ μ¬μΉμ°μ°μΌλ‘ μ νλ©λλ€. μμ νμ μ¦λͺ μ΄λ μνμ μΆλ‘ μ λ°μ μ±λ₯μ λνλ΄μ§ μμ΅λλ€.
4. μ€μ μΆλ ₯ μ¬λ‘
νμ΅ μ νμ μ€μ μλ΅μ μ λ³ν μ¬λ‘λ learning_examples.jsonμ μμ΅λλ€. Reasoning μλ΅μ λͺ¨λΈμ΄ μμ±ν thinkμ answer νκ·Έλ₯Ό ν¬ν¨ν μλ¬Έμ 보쑴ν©λλ€.