Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use abrown31/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 abrown31/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="abrown31/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("abrown31/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("abrown31/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 abrown31/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 "abrown31/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": "abrown31/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abrown31/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use abrown31/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 "abrown31/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": "abrown31/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 "abrown31/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": "abrown31/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abrown31/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/abrown31/Qwen2.5-1.5B-Open-R1-Distill
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 100, | |
| "global_step": 169, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.029585798816568046, | |
| "grad_norm": 2.344622727941314, | |
| "learning_rate": 5.882352941176471e-06, | |
| "loss": 1.0993, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.05917159763313609, | |
| "grad_norm": 1.6359093280771542, | |
| "learning_rate": 1.1764705882352942e-05, | |
| "loss": 1.0402, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.08875739644970414, | |
| "grad_norm": 0.9009305067501042, | |
| "learning_rate": 1.7647058823529414e-05, | |
| "loss": 0.9534, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.11834319526627218, | |
| "grad_norm": 0.6129507360939234, | |
| "learning_rate": 1.9980782984658682e-05, | |
| "loss": 0.8922, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.14792899408284024, | |
| "grad_norm": 0.5473214823207949, | |
| "learning_rate": 1.9863613034027224e-05, | |
| "loss": 0.8551, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.17751479289940827, | |
| "grad_norm": 0.4354640554244349, | |
| "learning_rate": 1.9641197940012136e-05, | |
| "loss": 0.8282, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.20710059171597633, | |
| "grad_norm": 0.38668038850154085, | |
| "learning_rate": 1.9315910880512792e-05, | |
| "loss": 0.8229, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 0.23668639053254437, | |
| "grad_norm": 0.6198246399667452, | |
| "learning_rate": 1.8891222681391853e-05, | |
| "loss": 0.8225, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.26627218934911245, | |
| "grad_norm": 0.35546434858949605, | |
| "learning_rate": 1.8371664782625287e-05, | |
| "loss": 0.8073, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.2958579881656805, | |
| "grad_norm": 0.34537870071009175, | |
| "learning_rate": 1.7762780887657576e-05, | |
| "loss": 0.7977, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.3254437869822485, | |
| "grad_norm": 0.38273269867976545, | |
| "learning_rate": 1.7071067811865477e-05, | |
| "loss": 0.7877, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 0.35502958579881655, | |
| "grad_norm": 0.3852562958725915, | |
| "learning_rate": 1.6303906161279554e-05, | |
| "loss": 0.7981, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.38461538461538464, | |
| "grad_norm": 0.3515762898399715, | |
| "learning_rate": 1.5469481581224274e-05, | |
| "loss": 0.7722, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 0.41420118343195267, | |
| "grad_norm": 0.3552498264547, | |
| "learning_rate": 1.4576697415156818e-05, | |
| "loss": 0.7741, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.4437869822485207, | |
| "grad_norm": 0.34494536403073905, | |
| "learning_rate": 1.3635079705638298e-05, | |
| "loss": 0.7852, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 0.47337278106508873, | |
| "grad_norm": 0.3582142945565384, | |
| "learning_rate": 1.2654675551080724e-05, | |
| "loss": 0.7667, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.5029585798816568, | |
| "grad_norm": 0.3788995625902085, | |
| "learning_rate": 1.164594590280734e-05, | |
| "loss": 0.7706, | |
| "step": 85 | |
| }, | |
| { | |
| "epoch": 0.5325443786982249, | |
| "grad_norm": 0.3657978440026351, | |
| "learning_rate": 1.0619653946285948e-05, | |
| "loss": 0.77, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.5621301775147929, | |
| "grad_norm": 0.38194618918014345, | |
| "learning_rate": 9.586750257511868e-06, | |
| "loss": 0.7771, | |
| "step": 95 | |
| }, | |
| { | |
| "epoch": 0.591715976331361, | |
| "grad_norm": 0.345004259839796, | |
| "learning_rate": 8.558255959926533e-06, | |
| "loss": 0.753, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.591715976331361, | |
| "eval_loss": 0.7880650162696838, | |
| "eval_runtime": 1.6398, | |
| "eval_samples_per_second": 78.06, | |
| "eval_steps_per_second": 2.439, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.621301775147929, | |
| "grad_norm": 0.34257625864865127, | |
| "learning_rate": 7.545145128592009e-06, | |
| "loss": 0.757, | |
| "step": 105 | |
| }, | |
| { | |
| "epoch": 0.650887573964497, | |
| "grad_norm": 0.3545785829028689, | |
| "learning_rate": 6.558227696373617e-06, | |
| "loss": 0.7681, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.6804733727810651, | |
| "grad_norm": 0.31591245783376204, | |
| "learning_rate": 5.608034111526298e-06, | |
| "loss": 0.7624, | |
| "step": 115 | |
| }, | |
| { | |
| "epoch": 0.7100591715976331, | |
| "grad_norm": 0.30221557192297555, | |
| "learning_rate": 4.704702977392914e-06, | |
| "loss": 0.7514, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.7396449704142012, | |
| "grad_norm": 0.351486993892204, | |
| "learning_rate": 3.857872873103322e-06, | |
| "loss": 0.7538, | |
| "step": 125 | |
| }, | |
| { | |
| "epoch": 0.7692307692307693, | |
| "grad_norm": 0.32006945339192444, | |
| "learning_rate": 3.0765795095517026e-06, | |
| "loss": 0.7555, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.7988165680473372, | |
| "grad_norm": 0.32954909179446346, | |
| "learning_rate": 2.369159318001937e-06, | |
| "loss": 0.7584, | |
| "step": 135 | |
| }, | |
| { | |
| "epoch": 0.8284023668639053, | |
| "grad_norm": 0.3039635535525039, | |
| "learning_rate": 1.743160500034443e-06, | |
| "loss": 0.7498, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.8579881656804734, | |
| "grad_norm": 0.3191098553123455, | |
| "learning_rate": 1.2052624879351105e-06, | |
| "loss": 0.7566, | |
| "step": 145 | |
| }, | |
| { | |
| "epoch": 0.8875739644970414, | |
| "grad_norm": 0.3015182345783156, | |
| "learning_rate": 7.612046748871327e-07, | |
| "loss": 0.7666, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.9171597633136095, | |
| "grad_norm": 0.3028140434605265, | |
| "learning_rate": 4.1572517541747294e-07, | |
| "loss": 0.7614, | |
| "step": 155 | |
| }, | |
| { | |
| "epoch": 0.9467455621301775, | |
| "grad_norm": 0.2907828066590422, | |
| "learning_rate": 1.7251026952640583e-07, | |
| "loss": 0.7607, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.9763313609467456, | |
| "grad_norm": 0.2814998362433586, | |
| "learning_rate": 3.4155069933301535e-08, | |
| "loss": 0.7446, | |
| "step": 165 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 169, | |
| "total_flos": 76916824473600.0, | |
| "train_loss": 0.8026634066767947, | |
| "train_runtime": 1012.1595, | |
| "train_samples_per_second": 21.35, | |
| "train_steps_per_second": 0.167 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 169, | |
| "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": 76916824473600.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |