Text Generation
Transformers
Safetensors
phi3
rl-verify
grpo
reasoning
calibration
conversational
custom_code
text-generation-inference
Instructions to use juwon1105/RLCR-phi4mini-bigmathdigits5000 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use juwon1105/RLCR-phi4mini-bigmathdigits5000 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="juwon1105/RLCR-phi4mini-bigmathdigits5000", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("juwon1105/RLCR-phi4mini-bigmathdigits5000", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("juwon1105/RLCR-phi4mini-bigmathdigits5000", trust_remote_code=True, 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use juwon1105/RLCR-phi4mini-bigmathdigits5000 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "juwon1105/RLCR-phi4mini-bigmathdigits5000" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "juwon1105/RLCR-phi4mini-bigmathdigits5000", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/juwon1105/RLCR-phi4mini-bigmathdigits5000
- SGLang
How to use juwon1105/RLCR-phi4mini-bigmathdigits5000 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 "juwon1105/RLCR-phi4mini-bigmathdigits5000" \ --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": "juwon1105/RLCR-phi4mini-bigmathdigits5000", "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 "juwon1105/RLCR-phi4mini-bigmathdigits5000" \ --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": "juwon1105/RLCR-phi4mini-bigmathdigits5000", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use juwon1105/RLCR-phi4mini-bigmathdigits5000 with Docker Model Runner:
docker model run hf.co/juwon1105/RLCR-phi4mini-bigmathdigits5000
|
Download README.md from juwon1105/RLCR-phi4mini-bigmathdigits5000: direct link, hf CLI and curl.
- Browser
- Download file 2.18 kB
-
https://huggingface.co/juwon1105/RLCR-phi4mini-bigmathdigits5000/resolve/main/README.md
- Command line
-
hf download hf://juwon1105/RLCR-phi4mini-bigmathdigits5000/README.md
-
curl -L -o README.md https://huggingface.co/juwon1105/RLCR-phi4mini-bigmathdigits5000/resolve/main/README.md
2.18 kB
| base_model: microsoft/Phi-4-mini-instruct | |
| datasets: | |
| - mehuldamani/big-math-digits | |
| library_name: transformers | |
| tags: | |
| - rl-verify | |
| - grpo | |
| - reasoning | |
| - calibration | |
| license: other | |
| # RLCR-phi4mini-bigmathdigits5000 | |
| This model is **Phi-4-mini-instruct** trained with **RLCR** (Reinforcement Learning with Calibration Rewards, Damani et al. 2026) on Big-Math-digits: adds a Brier-score-based reward on verbalized confidence to the correctness reward, jointly optimizing reasoning and calibration. | |
| ## Results | |
| | Metric | Value | | |
| |---|---| | |
| | Accuracy (held-out) | 0.414 | | |
| | ECE | 0.439 | | |
| | PCE | 0.439 | | |
| | Brier score | 0.427 | | |
| | AUROC | 0.652 | | |
| _Table 4 of the paper. Confidence source for the Phi-4-mini RLCC curricula._ | |
| ## LoRA | |
| LoRA target modules: `qkv_proj`, `o_proj`, `gate_up_proj`, `down_proj` (explicitly specified). | |
| Rank 16, alpha 32, dropout 0.05. | |
| ## Training details | |
| - **Algorithm**: GRPO, 1 epoch, per-device batch size 1, KL penalty β = 0, AdamW (8-bit), max grad norm 1.0. | |
| - **Dataset**: [mehuldamani/big-math-digits](https://huggingface.co/datasets/mehuldamani/big-math-digits), 5,000 training samples, 1,000 held-out for evaluation. | |
| - **Rollouts**: vLLM, temperature 0.7, 32 generations per prompt, effective rollout batch size 1,024. | |
| - **Learning rate**: 5e-6, linear schedule, warmup ratio 0.20. | |
| - **Max response length**: 1,024 tokens. | |
| - **Answer judging**: rule-based (exact match on extracted final answer). | |
| - **Compute**: single RTX 3090 (16-36 GPU-hours) except Qwen3-4B (single A100, 13-19 GPU-hours). | |
| ## Citation | |
| This checkpoint accompanies the paper *"Confidence as Curriculum: Reinforcement Learning for Joint Reasoning and Calibration"* (currently under anonymous peer review). A formal citation will be added once the paper is public. It builds directly on: | |
| ```bibtex | |
| @inproceedings{damani2026rlcr, | |
| title = {Beyond Binary Rewards: Training {LM}s to Reason about their Uncertainty}, | |
| author = {Damani, Mehul and Puri, Isha and Slocum, Stewart and Shenfeld, Idan and Choshen, Leshem and Kim, Yoon and Andreas, Jacob}, | |
| booktitle = {The Fourteenth International Conference on Learning Representations}, | |
| year = {2026} | |
| } | |
| ``` | |