Text Generation
Transformers
Safetensors
qwen3
math
reasoning
open-r1
trl
grpo
conversational
text-generation-inference
Run this model with HF Jobs
Run G2RPO-A/Qwen3-1.7B-Math on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/G2RPO-A/Qwen3-1.7B-Math. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/G2RPO-A/Qwen3-1.7B-Math on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/G2RPO-A/Qwen3-1.7B-Math. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/G2RPO-A/Qwen3-1.7B-Math. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use G2RPO-A/Qwen3-1.7B-Math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use G2RPO-A/Qwen3-1.7B-Math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="G2RPO-A/Qwen3-1.7B-Math") 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("G2RPO-A/Qwen3-1.7B-Math") model = AutoModelForCausalLM.from_pretrained("G2RPO-A/Qwen3-1.7B-Math", 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 G2RPO-A/Qwen3-1.7B-Math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "G2RPO-A/Qwen3-1.7B-Math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "G2RPO-A/Qwen3-1.7B-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/G2RPO-A/Qwen3-1.7B-Math
- SGLang
How to use G2RPO-A/Qwen3-1.7B-Math 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 "G2RPO-A/Qwen3-1.7B-Math" \ --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": "G2RPO-A/Qwen3-1.7B-Math", "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 "G2RPO-A/Qwen3-1.7B-Math" \ --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": "G2RPO-A/Qwen3-1.7B-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use G2RPO-A/Qwen3-1.7B-Math with Docker Model Runner:
docker model run hf.co/G2RPO-A/Qwen3-1.7B-Math
Correct model identity to Qwen3-1.7B for math tasks
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970---base_model: Qwen/Qwen3-0.6Bdatasets: Blancy/1ktestfrom10kwithdifficultyclasseslibrary_name: transformersmodel_name: Qwen3-0.6B-Open-R1-GRPOtags:- generated_from_trainer- open-r1- trl- grpolicence: license---# Model Card for Qwen3-0.6B-Open-R1-GRPOThis model is a fine-tuned version of [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) on the [Blancy/1ktestfrom10kwithdifficultyclasses](https://huggingface.co/datasets/Blancy/1ktestfrom10kwithdifficultyclasses) dataset.It has been trained using [TRL](https://github.com/huggingface/trl).## Quick start```pythonfrom transformers import pipelinequestion = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"generator = pipeline("text-generation", model="Blancy/Qwen3-0.6B-Open-R1-GRPO", device="cuda")output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]print(output["generated_text"])```## Training procedureThis model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://huggingface.co/papers/2402.03300).### Framework versions- TRL: 0.15.2- Transformers: 4.52.3- Pytorch: 2.5.1- Datasets: 3.6.0- Tokenizers: 0.21.1## CitationsCite GRPO as:```bibtex@article{zhihong2024deepseekmath,title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},year = 2024,eprint = {arXiv:2402.03300},}```Cite TRL as:```bibtex@misc{vonwerra2022trl,title = {{TRL: Transformer Reinforcement Learning}},author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},year = 2020,journal = {GitHub repository},publisher = {GitHub},howpublished = {\url{https://github.com/huggingface/trl}}}```1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465---base_model: Qwen/Qwen3-1.7Bdatasets:- G2RPO-A/Math-Curriculum-1Klibrary_name: transformerspipeline_tag: text-generationmodel_name: Qwen3-1.7B-Mathtags:- math- reasoning- open-r1- trl- grpo---# Qwen3-1.7B-MathThis checkpoint is released for mathematical reasoning experiments in the [G²RPO-A project](https://github.com/T-Lab-CUHKSZ/G2RPO-A). It was fine-tuned from [Qwen/Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B) using the mathematical guidance data now available as [G2RPO-A/Math-Curriculum-1K](https://huggingface.co/datasets/G2RPO-A/Math-Curriculum-1K).## Model identityThe original repository name and generated model card incorrectly labeled this checkpoint as Qwen3-0.6B. The checkpoint's `config.json` matches the official Qwen3-1.7B configuration on the key architecture fields: 28 layers, hidden size 2048, intermediate size 6144, 16 attention heads, 8 key/value heads, and vocabulary size 151936. The model owner identifies it as the 1.7B mathematical-task checkpoint. This documentation correction does not modify the model weights or configuration.## Quick start```pythonfrom transformers import pipelinegenerator = pipeline("text-generation",model="Blancy/Qwen3-0.6B-Open-R1-GRPO",device="cuda",)question = "Solve 2x + 3 = 11. Explain your reasoning and give the value of x."output = generator([{"role": "user", "content": question}],max_new_tokens=2048,do_sample=True,temperature=0.6,top_p=0.95,top_k=20,return_full_text=False,)[0]print(output["generated_text"])```## Training and framework versionsThe original training-generated card records GRPO training with TRL and the following framework versions:- TRL: 0.15.2- Transformers: 4.52.3- PyTorch: 2.5.1- Datasets: 3.6.0- Tokenizers: 0.21.1Use Transformers 4.52.3 to match that record; the older 4.49.0 Open-R1 dependency pin does not support Qwen3 out of the box.See the [ACL 2026 paper](https://aclanthology.org/2026.acl-long.206/) for the project methodology. This card does not assign the paper's benchmark scores to this checkpoint without a matching evaluation record.## References- [G²RPO-A: Guided Group Relative Policy Optimization with Adaptive Guidance](https://aclanthology.org/2026.acl-long.206/)- [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://arxiv.org/abs/2402.03300)- [TRL: Transformer Reinforcement Learning](https://github.com/huggingface/trl)
README.md+37-42