Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use V1ki/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 V1ki/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="V1ki/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("V1ki/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("V1ki/Qwen2.5-1.5B-Open-R1-Distill", 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 V1ki/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 "V1ki/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": "V1ki/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/V1ki/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use V1ki/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 "V1ki/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": "V1ki/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 "V1ki/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": "V1ki/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use V1ki/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/V1ki/Qwen2.5-1.5B-Open-R1-Distill
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.997779422649889, | |
| "eval_steps": 100, | |
| "global_step": 337, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.014803849000740192, | |
| "grad_norm": 2.5992181301116943, | |
| "learning_rate": 2.9411764705882355e-06, | |
| "loss": 1.09, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.029607698001480384, | |
| "grad_norm": 1.5087730884552002, | |
| "learning_rate": 5.882352941176471e-06, | |
| "loss": 1.0788, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.04441154700222058, | |
| "grad_norm": 1.2677146196365356, | |
| "learning_rate": 8.823529411764707e-06, | |
| "loss": 1.0147, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.05921539600296077, | |
| "grad_norm": 0.9016809463500977, | |
| "learning_rate": 1.1764705882352942e-05, | |
| "loss": 0.9334, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.07401924500370097, | |
| "grad_norm": 0.7976483106613159, | |
| "learning_rate": 1.4705882352941179e-05, | |
| "loss": 0.9001, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.08882309400444116, | |
| "grad_norm": 0.6809649467468262, | |
| "learning_rate": 1.7647058823529414e-05, | |
| "loss": 0.8802, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.10362694300518134, | |
| "grad_norm": 0.6254366040229797, | |
| "learning_rate": 1.9999462497359468e-05, | |
| "loss": 0.8536, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 0.11843079200592153, | |
| "grad_norm": 0.5435229539871216, | |
| "learning_rate": 1.9980655971335944e-05, | |
| "loss": 0.8348, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.13323464100666174, | |
| "grad_norm": 0.5121663212776184, | |
| "learning_rate": 1.993503206718859e-05, | |
| "loss": 0.8136, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.14803849000740193, | |
| "grad_norm": 0.6101697683334351, | |
| "learning_rate": 1.986271337340182e-05, | |
| "loss": 0.8198, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.16284233900814213, | |
| "grad_norm": 0.5170488357543945, | |
| "learning_rate": 1.976389420563607e-05, | |
| "loss": 0.8029, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 0.17764618800888232, | |
| "grad_norm": 0.4948929250240326, | |
| "learning_rate": 1.9638840084614182e-05, | |
| "loss": 0.7894, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.19245003700962252, | |
| "grad_norm": 0.5749170780181885, | |
| "learning_rate": 1.9487887022684336e-05, | |
| "loss": 0.7994, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 0.20725388601036268, | |
| "grad_norm": 0.5195707082748413, | |
| "learning_rate": 1.9311440620976597e-05, | |
| "loss": 0.7927, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.22205773501110287, | |
| "grad_norm": 0.5418318510055542, | |
| "learning_rate": 1.9109974979578852e-05, | |
| "loss": 0.7837, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 0.23686158401184307, | |
| "grad_norm": 0.5383281111717224, | |
| "learning_rate": 1.8884031423660492e-05, | |
| "loss": 0.8122, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.25166543301258326, | |
| "grad_norm": 0.5377805829048157, | |
| "learning_rate": 1.8634217048966638e-05, | |
| "loss": 0.7951, | |
| "step": 85 | |
| }, | |
| { | |
| "epoch": 0.2664692820133235, | |
| "grad_norm": 0.5460654497146606, | |
| "learning_rate": 1.836120309059107e-05, | |
| "loss": 0.7778, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.28127313101406365, | |
| "grad_norm": 0.5279029607772827, | |
| "learning_rate": 1.8065723119410885e-05, | |
| "loss": 0.7756, | |
| "step": 95 | |
| }, | |
| { | |
| "epoch": 0.29607698001480387, | |
| "grad_norm": 0.5558004379272461, | |
| "learning_rate": 1.77485710710289e-05, | |
| "loss": 0.7824, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.29607698001480387, | |
| "eval_loss": 0.798744797706604, | |
| "eval_runtime": 4.9568, | |
| "eval_samples_per_second": 25.823, | |
| "eval_steps_per_second": 1.614, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.31088082901554404, | |
| "grad_norm": 0.49692487716674805, | |
| "learning_rate": 1.741059911251997e-05, | |
| "loss": 0.7732, | |
| "step": 105 | |
| }, | |
| { | |
| "epoch": 0.32568467801628426, | |
| "grad_norm": 0.5316541790962219, | |
| "learning_rate": 1.7052715352713076e-05, | |
| "loss": 0.7674, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.3404885270170244, | |
| "grad_norm": 0.530269980430603, | |
| "learning_rate": 1.667588140216154e-05, | |
| "loss": 0.7944, | |
| "step": 115 | |
| }, | |
| { | |
| "epoch": 0.35529237601776464, | |
| "grad_norm": 0.5283094644546509, | |
| "learning_rate": 1.628110978935756e-05, | |
| "loss": 0.7688, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.3700962250185048, | |
| "grad_norm": 0.5419968366622925, | |
| "learning_rate": 1.586946124013354e-05, | |
| "loss": 0.7683, | |
| "step": 125 | |
| }, | |
| { | |
| "epoch": 0.38490007401924503, | |
| "grad_norm": 0.5174740552902222, | |
| "learning_rate": 1.5442041827560274e-05, | |
| "loss": 0.745, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.3997039230199852, | |
| "grad_norm": 0.5500133633613586, | |
| "learning_rate": 1.5000000000000002e-05, | |
| "loss": 0.7559, | |
| "step": 135 | |
| }, | |
| { | |
| "epoch": 0.41450777202072536, | |
| "grad_norm": 0.5237729549407959, | |
| "learning_rate": 1.4544523495299843e-05, | |
| "loss": 0.7621, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.4293116210214656, | |
| "grad_norm": 0.5662232041358948, | |
| "learning_rate": 1.4076836149416889e-05, | |
| "loss": 0.778, | |
| "step": 145 | |
| }, | |
| { | |
| "epoch": 0.44411547002220575, | |
| "grad_norm": 0.5192484259605408, | |
| "learning_rate": 1.3598194608050011e-05, | |
| "loss": 0.7627, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.45891931902294597, | |
| "grad_norm": 0.47917070984840393, | |
| "learning_rate": 1.3109884950114007e-05, | |
| "loss": 0.7521, | |
| "step": 155 | |
| }, | |
| { | |
| "epoch": 0.47372316802368614, | |
| "grad_norm": 0.4877147972583771, | |
| "learning_rate": 1.2613219232128608e-05, | |
| "loss": 0.752, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.48852701702442636, | |
| "grad_norm": 0.4902460277080536, | |
| "learning_rate": 1.2109531962807333e-05, | |
| "loss": 0.7537, | |
| "step": 165 | |
| }, | |
| { | |
| "epoch": 0.5033308660251665, | |
| "grad_norm": 0.4749601483345032, | |
| "learning_rate": 1.1600176517318742e-05, | |
| "loss": 0.7581, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.5181347150259067, | |
| "grad_norm": 0.49789533019065857, | |
| "learning_rate": 1.1086521500854746e-05, | |
| "loss": 0.7452, | |
| "step": 175 | |
| }, | |
| { | |
| "epoch": 0.532938564026647, | |
| "grad_norm": 0.49085575342178345, | |
| "learning_rate": 1.0569947071276847e-05, | |
| "loss": 0.766, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.5477424130273871, | |
| "grad_norm": 0.5533766150474548, | |
| "learning_rate": 1.0051841230721065e-05, | |
| "loss": 0.7591, | |
| "step": 185 | |
| }, | |
| { | |
| "epoch": 0.5625462620281273, | |
| "grad_norm": 0.4962024390697479, | |
| "learning_rate": 9.533596096125826e-06, | |
| "loss": 0.7656, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.5773501110288675, | |
| "grad_norm": 0.47751423716545105, | |
| "learning_rate": 9.016604158703654e-06, | |
| "loss": 0.7398, | |
| "step": 195 | |
| }, | |
| { | |
| "epoch": 0.5921539600296077, | |
| "grad_norm": 0.48585522174835205, | |
| "learning_rate": 8.502254542407186e-06, | |
| "loss": 0.7375, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.5921539600296077, | |
| "eval_loss": 0.7733819484710693, | |
| "eval_runtime": 4.9465, | |
| "eval_samples_per_second": 25.877, | |
| "eval_steps_per_second": 1.617, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.6069578090303479, | |
| "grad_norm": 0.4782666563987732, | |
| "learning_rate": 7.991929271442817e-06, | |
| "loss": 0.7415, | |
| "step": 205 | |
| }, | |
| { | |
| "epoch": 0.6217616580310881, | |
| "grad_norm": 0.4925994575023651, | |
| "learning_rate": 7.48699955686089e-06, | |
| "loss": 0.7437, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.6365655070318282, | |
| "grad_norm": 0.4650406241416931, | |
| "learning_rate": 6.988822112200157e-06, | |
| "loss": 0.7518, | |
| "step": 215 | |
| }, | |
| { | |
| "epoch": 0.6513693560325685, | |
| "grad_norm": 0.4966399669647217, | |
| "learning_rate": 6.498735508086094e-06, | |
| "loss": 0.755, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.6661732050333087, | |
| "grad_norm": 0.443478524684906, | |
| "learning_rate": 6.018056575578075e-06, | |
| "loss": 0.7487, | |
| "step": 225 | |
| }, | |
| { | |
| "epoch": 0.6809770540340488, | |
| "grad_norm": 0.412899374961853, | |
| "learning_rate": 5.548076867929331e-06, | |
| "loss": 0.7455, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.695780903034789, | |
| "grad_norm": 0.4347788989543915, | |
| "learning_rate": 5.090059190266779e-06, | |
| "loss": 0.7336, | |
| "step": 235 | |
| }, | |
| { | |
| "epoch": 0.7105847520355293, | |
| "grad_norm": 0.43398064374923706, | |
| "learning_rate": 4.645234206515171e-06, | |
| "loss": 0.7388, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.7253886010362695, | |
| "grad_norm": 0.4548566937446594, | |
| "learning_rate": 4.214797132682597e-06, | |
| "loss": 0.7352, | |
| "step": 245 | |
| }, | |
| { | |
| "epoch": 0.7401924500370096, | |
| "grad_norm": 0.4564402997493744, | |
| "learning_rate": 3.799904525392251e-06, | |
| "loss": 0.7422, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.7549962990377498, | |
| "grad_norm": 0.4452548325061798, | |
| "learning_rate": 3.401671174289469e-06, | |
| "loss": 0.7323, | |
| "step": 255 | |
| }, | |
| { | |
| "epoch": 0.7698001480384901, | |
| "grad_norm": 0.44198399782180786, | |
| "learning_rate": 3.021167106673928e-06, | |
| "loss": 0.7483, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.7846039970392302, | |
| "grad_norm": 0.43686527013778687, | |
| "learning_rate": 2.6594147124053983e-06, | |
| "loss": 0.7371, | |
| "step": 265 | |
| }, | |
| { | |
| "epoch": 0.7994078460399704, | |
| "grad_norm": 0.4451473653316498, | |
| "learning_rate": 2.317385996808195e-06, | |
| "loss": 0.7488, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 0.8142116950407106, | |
| "grad_norm": 0.4142710566520691, | |
| "learning_rate": 1.9959999689556407e-06, | |
| "loss": 0.7413, | |
| "step": 275 | |
| }, | |
| { | |
| "epoch": 0.8290155440414507, | |
| "grad_norm": 0.4243415594100952, | |
| "learning_rate": 1.6961201723520248e-06, | |
| "loss": 0.7272, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.843819393042191, | |
| "grad_norm": 0.4001702666282654, | |
| "learning_rate": 1.4185523646469822e-06, | |
| "loss": 0.752, | |
| "step": 285 | |
| }, | |
| { | |
| "epoch": 0.8586232420429312, | |
| "grad_norm": 0.4234675168991089, | |
| "learning_rate": 1.1640423526166987e-06, | |
| "loss": 0.7298, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 0.8734270910436713, | |
| "grad_norm": 0.40520840883255005, | |
| "learning_rate": 9.332739882292752e-07, | |
| "loss": 0.7559, | |
| "step": 295 | |
| }, | |
| { | |
| "epoch": 0.8882309400444115, | |
| "grad_norm": 0.40351057052612305, | |
| "learning_rate": 7.268673311786378e-07, | |
| "loss": 0.7456, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.8882309400444115, | |
| "eval_loss": 0.7648847103118896, | |
| "eval_runtime": 4.9484, | |
| "eval_samples_per_second": 25.867, | |
| "eval_steps_per_second": 1.617, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.9030347890451518, | |
| "grad_norm": 0.388411283493042, | |
| "learning_rate": 5.453769828241872e-07, | |
| "loss": 0.7295, | |
| "step": 305 | |
| }, | |
| { | |
| "epoch": 0.9178386380458919, | |
| "grad_norm": 0.415742963552475, | |
| "learning_rate": 3.8929059601275463e-07, | |
| "loss": 0.7617, | |
| "step": 310 | |
| }, | |
| { | |
| "epoch": 0.9326424870466321, | |
| "grad_norm": 0.39539769291877747, | |
| "learning_rate": 2.5902756478688674e-07, | |
| "loss": 0.7441, | |
| "step": 315 | |
| }, | |
| { | |
| "epoch": 0.9474463360473723, | |
| "grad_norm": 0.40046682953834534, | |
| "learning_rate": 1.5493789750014032e-07, | |
| "loss": 0.7459, | |
| "step": 320 | |
| }, | |
| { | |
| "epoch": 0.9622501850481125, | |
| "grad_norm": 0.42745569348335266, | |
| "learning_rate": 7.730127636723539e-08, | |
| "loss": 0.7266, | |
| "step": 325 | |
| }, | |
| { | |
| "epoch": 0.9770540340488527, | |
| "grad_norm": 0.42035773396492004, | |
| "learning_rate": 2.6326305976001054e-08, | |
| "loss": 0.7313, | |
| "step": 330 | |
| }, | |
| { | |
| "epoch": 0.9918578830495929, | |
| "grad_norm": 0.44245919585227966, | |
| "learning_rate": 2.149952780321485e-09, | |
| "loss": 0.7525, | |
| "step": 335 | |
| }, | |
| { | |
| "epoch": 0.997779422649889, | |
| "step": 337, | |
| "total_flos": 76745898196992.0, | |
| "train_loss": 0.7814815865072369, | |
| "train_runtime": 4121.13, | |
| "train_samples_per_second": 5.244, | |
| "train_steps_per_second": 0.082 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 337, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": false, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 76745898196992.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |