Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use achenyang/Qwen2.5-1.5B-Open-R1-Distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use achenyang/Qwen2.5-1.5B-Open-R1-Distill with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="achenyang/Qwen2.5-1.5B-Open-R1-Distill") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("achenyang/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("achenyang/Qwen2.5-1.5B-Open-R1-Distill") 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
- vLLM
How to use achenyang/Qwen2.5-1.5B-Open-R1-Distill with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "achenyang/Qwen2.5-1.5B-Open-R1-Distill" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "achenyang/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/achenyang/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use achenyang/Qwen2.5-1.5B-Open-R1-Distill 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 "achenyang/Qwen2.5-1.5B-Open-R1-Distill" \ --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": "achenyang/Qwen2.5-1.5B-Open-R1-Distill", "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 "achenyang/Qwen2.5-1.5B-Open-R1-Distill" \ --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": "achenyang/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use achenyang/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/achenyang/Qwen2.5-1.5B-Open-R1-Distill
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 269, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.01858736059479554, | |
| "grad_norm": 1.7748458880073428, | |
| "learning_rate": 1.785714285714286e-05, | |
| "loss": 0.8465, | |
| "num_tokens": 10465392.0, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.03717472118959108, | |
| "grad_norm": 0.7838825154450243, | |
| "learning_rate": 3.571428571428572e-05, | |
| "loss": 0.7778, | |
| "num_tokens": 20951152.0, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.055762081784386616, | |
| "grad_norm": 0.49331336728554126, | |
| "learning_rate": 4.9998292477583695e-05, | |
| "loss": 0.7094, | |
| "num_tokens": 31436912.0, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.07434944237918216, | |
| "grad_norm": 0.4133148839058336, | |
| "learning_rate": 4.993855640118024e-05, | |
| "loss": 0.6711, | |
| "num_tokens": 41909269.0, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.09293680297397769, | |
| "grad_norm": 0.3825674501179879, | |
| "learning_rate": 4.9793703194560106e-05, | |
| "loss": 0.6519, | |
| "num_tokens": 52353719.0, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.11152416356877323, | |
| "grad_norm": 0.2748737572177175, | |
| "learning_rate": 4.9564282335552e-05, | |
| "loss": 0.6365, | |
| "num_tokens": 62792124.0, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.13011152416356878, | |
| "grad_norm": 0.2588224644094676, | |
| "learning_rate": 4.9251164096056716e-05, | |
| "loss": 0.6218, | |
| "num_tokens": 73260442.0, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 0.14869888475836432, | |
| "grad_norm": 0.24985157449427295, | |
| "learning_rate": 4.885553624080778e-05, | |
| "loss": 0.6054, | |
| "num_tokens": 83727556.0, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.16728624535315986, | |
| "grad_norm": 0.2730255511311596, | |
| "learning_rate": 4.8378899521772935e-05, | |
| "loss": 0.6043, | |
| "num_tokens": 94201938.0, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.18587360594795538, | |
| "grad_norm": 0.32189646933598365, | |
| "learning_rate": 4.78230619852879e-05, | |
| "loss": 0.5968, | |
| "num_tokens": 104670740.0, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.20446096654275092, | |
| "grad_norm": 0.3446945760310899, | |
| "learning_rate": 4.719013211351733e-05, | |
| "loss": 0.5999, | |
| "num_tokens": 115151933.0, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 0.22304832713754646, | |
| "grad_norm": 0.4005901865169395, | |
| "learning_rate": 4.648251082625975e-05, | |
| "loss": 0.5907, | |
| "num_tokens": 125607410.0, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.241635687732342, | |
| "grad_norm": 0.4200733236336745, | |
| "learning_rate": 4.570288237343632e-05, | |
| "loss": 0.5885, | |
| "num_tokens": 136036466.0, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 0.26022304832713755, | |
| "grad_norm": 0.4452838176170994, | |
| "learning_rate": 4.4854204152811567e-05, | |
| "loss": 0.585, | |
| "num_tokens": 146502251.0, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.2788104089219331, | |
| "grad_norm": 0.34928351958921744, | |
| "learning_rate": 4.39396954915706e-05, | |
| "loss": 0.5823, | |
| "num_tokens": 156977308.0, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 0.29739776951672864, | |
| "grad_norm": 0.24490608281359427, | |
| "learning_rate": 4.2962825434308415e-05, | |
| "loss": 0.5761, | |
| "num_tokens": 167423794.0, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.3159851301115242, | |
| "grad_norm": 0.3023061176554802, | |
| "learning_rate": 4.1927299583755515e-05, | |
| "loss": 0.5686, | |
| "num_tokens": 177900466.0, | |
| "step": 85 | |
| }, | |
| { | |
| "epoch": 0.3345724907063197, | |
| "grad_norm": 0.29627462407288097, | |
| "learning_rate": 4.083704604415748e-05, | |
| "loss": 0.5726, | |
| "num_tokens": 188373813.0, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.35315985130111527, | |
| "grad_norm": 0.2640772452060072, | |
| "learning_rate": 3.969620052063012e-05, | |
| "loss": 0.5708, | |
| "num_tokens": 198859382.0, | |
| "step": 95 | |
| }, | |
| { | |
| "epoch": 0.37174721189591076, | |
| "grad_norm": 0.28421045673215595, | |
| "learning_rate": 3.850909063101328e-05, | |
| "loss": 0.5677, | |
| "num_tokens": 209345142.0, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.3903345724907063, | |
| "grad_norm": 0.29353912443451874, | |
| "learning_rate": 3.728021948973421e-05, | |
| "loss": 0.5669, | |
| "num_tokens": 219820636.0, | |
| "step": 105 | |
| }, | |
| { | |
| "epoch": 0.40892193308550184, | |
| "grad_norm": 0.3100729201655249, | |
| "learning_rate": 3.6014248625951984e-05, | |
| "loss": 0.5591, | |
| "num_tokens": 230306396.0, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.4275092936802974, | |
| "grad_norm": 0.33100633172043104, | |
| "learning_rate": 3.4715980300780745e-05, | |
| "loss": 0.5628, | |
| "num_tokens": 240792156.0, | |
| "step": 115 | |
| }, | |
| { | |
| "epoch": 0.44609665427509293, | |
| "grad_norm": 0.29364812956592673, | |
| "learning_rate": 3.339033929066841e-05, | |
| "loss": 0.5613, | |
| "num_tokens": 251259365.0, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.4646840148698885, | |
| "grad_norm": 0.2867933789338668, | |
| "learning_rate": 3.204235420603273e-05, | |
| "loss": 0.5646, | |
| "num_tokens": 261736444.0, | |
| "step": 125 | |
| }, | |
| { | |
| "epoch": 0.483271375464684, | |
| "grad_norm": 0.27947739013839007, | |
| "learning_rate": 3.0677138416019556e-05, | |
| "loss": 0.5631, | |
| "num_tokens": 272205866.0, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.5018587360594795, | |
| "grad_norm": 0.2722460855948393, | |
| "learning_rate": 2.9299870651742188e-05, | |
| "loss": 0.5588, | |
| "num_tokens": 282683327.0, | |
| "step": 135 | |
| }, | |
| { | |
| "epoch": 0.5204460966542751, | |
| "grad_norm": 0.2677741067107428, | |
| "learning_rate": 2.7915775361580428e-05, | |
| "loss": 0.5613, | |
| "num_tokens": 293122806.0, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.5390334572490706, | |
| "grad_norm": 0.20498244583778025, | |
| "learning_rate": 2.6530102893058357e-05, | |
| "loss": 0.5607, | |
| "num_tokens": 303598947.0, | |
| "step": 145 | |
| }, | |
| { | |
| "epoch": 0.5576208178438662, | |
| "grad_norm": 0.2624935848438334, | |
| "learning_rate": 2.5148109576477802e-05, | |
| "loss": 0.558, | |
| "num_tokens": 314077641.0, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.5762081784386617, | |
| "grad_norm": 0.21557773960243973, | |
| "learning_rate": 2.3775037785857073e-05, | |
| "loss": 0.5489, | |
| "num_tokens": 324545386.0, | |
| "step": 155 | |
| }, | |
| { | |
| "epoch": 0.5947955390334573, | |
| "grad_norm": 0.1804719970900821, | |
| "learning_rate": 2.2416096052810688e-05, | |
| "loss": 0.561, | |
| "num_tokens": 335031146.0, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.6133828996282528, | |
| "grad_norm": 0.21111562601987344, | |
| "learning_rate": 2.1076439308804808e-05, | |
| "loss": 0.5413, | |
| "num_tokens": 345504904.0, | |
| "step": 165 | |
| }, | |
| { | |
| "epoch": 0.6319702602230484, | |
| "grad_norm": 0.18830812370514324, | |
| "learning_rate": 1.976114933073662e-05, | |
| "loss": 0.5509, | |
| "num_tokens": 355956520.0, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.6505576208178439, | |
| "grad_norm": 0.16682350764703732, | |
| "learning_rate": 1.847521546401383e-05, | |
| "loss": 0.5516, | |
| "num_tokens": 366434348.0, | |
| "step": 175 | |
| }, | |
| { | |
| "epoch": 0.6691449814126395, | |
| "grad_norm": 0.194069727559084, | |
| "learning_rate": 1.7223515696258592e-05, | |
| "loss": 0.5544, | |
| "num_tokens": 376908695.0, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.6877323420074349, | |
| "grad_norm": 0.18531786627362998, | |
| "learning_rate": 1.60107981534296e-05, | |
| "loss": 0.5572, | |
| "num_tokens": 387384301.0, | |
| "step": 185 | |
| }, | |
| { | |
| "epoch": 0.7063197026022305, | |
| "grad_norm": 0.17221936746899835, | |
| "learning_rate": 1.484166308855398e-05, | |
| "loss": 0.5481, | |
| "num_tokens": 397835323.0, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.724907063197026, | |
| "grad_norm": 0.16346435772600548, | |
| "learning_rate": 1.372054543139188e-05, | |
| "loss": 0.5468, | |
| "num_tokens": 408298322.0, | |
| "step": 195 | |
| }, | |
| { | |
| "epoch": 0.7434944237918215, | |
| "grad_norm": 0.15817012831438015, | |
| "learning_rate": 1.2651697965228748e-05, | |
| "loss": 0.5527, | |
| "num_tokens": 418781566.0, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.7620817843866171, | |
| "grad_norm": 0.17416374705456045, | |
| "learning_rate": 1.1639175194611693e-05, | |
| "loss": 0.5486, | |
| "num_tokens": 429246222.0, | |
| "step": 205 | |
| }, | |
| { | |
| "epoch": 0.7806691449814126, | |
| "grad_norm": 0.16695529724433658, | |
| "learning_rate": 1.0686817965224952e-05, | |
| "loss": 0.5426, | |
| "num_tokens": 439717644.0, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.7992565055762082, | |
| "grad_norm": 0.16149876332974855, | |
| "learning_rate": 9.798238894246628e-06, | |
| "loss": 0.5519, | |
| "num_tokens": 450170885.0, | |
| "step": 215 | |
| }, | |
| { | |
| "epoch": 0.8178438661710037, | |
| "grad_norm": 0.17260811595577585, | |
| "learning_rate": 8.976808666454292e-06, | |
| "loss": 0.5478, | |
| "num_tokens": 460656645.0, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.8364312267657993, | |
| "grad_norm": 0.1766347443348622, | |
| "learning_rate": 8.225643248063091e-06, | |
| "loss": 0.5401, | |
| "num_tokens": 471142405.0, | |
| "step": 225 | |
| }, | |
| { | |
| "epoch": 0.8550185873605948, | |
| "grad_norm": 0.14541029180888454, | |
| "learning_rate": 7.547592066798609e-06, | |
| "loss": 0.5444, | |
| "num_tokens": 481616409.0, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.8736059479553904, | |
| "grad_norm": 0.16761353658368752, | |
| "learning_rate": 6.94522720304148e-06, | |
| "loss": 0.5437, | |
| "num_tokens": 492097674.0, | |
| "step": 235 | |
| }, | |
| { | |
| "epoch": 0.8921933085501859, | |
| "grad_norm": 0.14765012152206536, | |
| "learning_rate": 6.420833633045514e-06, | |
| "loss": 0.5414, | |
| "num_tokens": 502555042.0, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.9107806691449815, | |
| "grad_norm": 0.1473288222604296, | |
| "learning_rate": 5.976400561240085e-06, | |
| "loss": 0.5394, | |
| "num_tokens": 513031521.0, | |
| "step": 245 | |
| }, | |
| { | |
| "epoch": 0.929368029739777, | |
| "grad_norm": 0.14321126088523142, | |
| "learning_rate": 5.613613874496393e-06, | |
| "loss": 0.5477, | |
| "num_tokens": 523517281.0, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.9479553903345725, | |
| "grad_norm": 0.14780305556846282, | |
| "learning_rate": 5.333849746981104e-06, | |
| "loss": 0.544, | |
| "num_tokens": 533998146.0, | |
| "step": 255 | |
| }, | |
| { | |
| "epoch": 0.966542750929368, | |
| "grad_norm": 0.14042403367339404, | |
| "learning_rate": 5.138169419856345e-06, | |
| "loss": 0.5401, | |
| "num_tokens": 544470561.0, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.9851301115241635, | |
| "grad_norm": 0.14692561245121205, | |
| "learning_rate": 5.027315175628478e-06, | |
| "loss": 0.5364, | |
| "num_tokens": 554934577.0, | |
| "step": 265 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "num_tokens": 562274609.0, | |
| "step": 269, | |
| "total_flos": 490444463013888.0, | |
| "train_loss": 0.5788193528980128, | |
| "train_runtime": 6320.6615, | |
| "train_samples_per_second": 5.428, | |
| "train_steps_per_second": 0.043 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 269, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 100, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 490444463013888.0, | |
| "train_batch_size": 16, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |