Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin") model = AutoModelForCausalLM.from_pretrained("Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin
- SGLang
How to use Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin 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 "Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin" \ --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": "Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin", "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 "Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin" \ --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": "Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin with Docker Model Runner:
docker model run hf.co/Qucy/Qwen2.5-0.5B-Open-R1-Distill-Fin
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.9907120743034055, | |
| "eval_steps": 100, | |
| "global_step": 242, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.0412796697626419, | |
| "grad_norm": 0.5423572411981227, | |
| "learning_rate": 4.000000000000001e-06, | |
| "loss": 1.9532, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.0825593395252838, | |
| "grad_norm": 0.3952174476286853, | |
| "learning_rate": 8.000000000000001e-06, | |
| "loss": 1.8852, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.1238390092879257, | |
| "grad_norm": 0.39153877344371674, | |
| "learning_rate": 1.2e-05, | |
| "loss": 1.7935, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.1651186790505676, | |
| "grad_norm": 0.27826347316491185, | |
| "learning_rate": 1.6000000000000003e-05, | |
| "loss": 1.5697, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.20639834881320948, | |
| "grad_norm": 0.27509780034807013, | |
| "learning_rate": 2e-05, | |
| "loss": 1.3934, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.2476780185758514, | |
| "grad_norm": 0.31439323035169303, | |
| "learning_rate": 1.997381210172319e-05, | |
| "loss": 1.284, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.2889576883384933, | |
| "grad_norm": 0.1926553270852725, | |
| "learning_rate": 1.989538556809598e-05, | |
| "loss": 1.1481, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 0.3302373581011352, | |
| "grad_norm": 0.16412584493261162, | |
| "learning_rate": 1.9765131164335345e-05, | |
| "loss": 1.1067, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.3715170278637771, | |
| "grad_norm": 0.14201820701986695, | |
| "learning_rate": 1.958373110825644e-05, | |
| "loss": 1.0804, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.41279669762641896, | |
| "grad_norm": 0.13251231709921993, | |
| "learning_rate": 1.9352135497102464e-05, | |
| "loss": 1.074, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.4540763673890609, | |
| "grad_norm": 0.15466409379526366, | |
| "learning_rate": 1.907155733133467e-05, | |
| "loss": 1.0715, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 0.4953560371517028, | |
| "grad_norm": 0.14973122929035207, | |
| "learning_rate": 1.8743466161445823e-05, | |
| "loss": 1.0653, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.5366357069143447, | |
| "grad_norm": 0.14709203237203478, | |
| "learning_rate": 1.8369580391072435e-05, | |
| "loss": 1.0496, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 0.5779153766769866, | |
| "grad_norm": 0.12510498686662688, | |
| "learning_rate": 1.7951858276718845e-05, | |
| "loss": 1.0392, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.6191950464396285, | |
| "grad_norm": 0.14382258751082552, | |
| "learning_rate": 1.7492487671232784e-05, | |
| "loss": 1.0278, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 0.6604747162022704, | |
| "grad_norm": 0.13327205460615688, | |
| "learning_rate": 1.6993874564751824e-05, | |
| "loss": 1.0243, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.7017543859649122, | |
| "grad_norm": 0.12863671293917475, | |
| "learning_rate": 1.6458630483138354e-05, | |
| "loss": 1.0325, | |
| "step": 85 | |
| }, | |
| { | |
| "epoch": 0.7430340557275542, | |
| "grad_norm": 0.1391969379512732, | |
| "learning_rate": 1.58895588099049e-05, | |
| "loss": 1.0146, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.7843137254901961, | |
| "grad_norm": 0.12799160286774816, | |
| "learning_rate": 1.5289640103269626e-05, | |
| "loss": 1.0312, | |
| "step": 95 | |
| }, | |
| { | |
| "epoch": 0.8255933952528379, | |
| "grad_norm": 0.1255522837974007, | |
| "learning_rate": 1.4662016485245274e-05, | |
| "loss": 1.0285, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.8255933952528379, | |
| "eval_loss": 1.045740008354187, | |
| "eval_runtime": 1.5063, | |
| "eval_samples_per_second": 15.933, | |
| "eval_steps_per_second": 1.992, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.8668730650154799, | |
| "grad_norm": 0.13220466757417867, | |
| "learning_rate": 1.400997518452484e-05, | |
| "loss": 1.0197, | |
| "step": 105 | |
| }, | |
| { | |
| "epoch": 0.9081527347781218, | |
| "grad_norm": 0.12455077448359639, | |
| "learning_rate": 1.3336931319359428e-05, | |
| "loss": 0.9905, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.9494324045407637, | |
| "grad_norm": 0.13056751429758742, | |
| "learning_rate": 1.2646410010604397e-05, | |
| "loss": 1.0204, | |
| "step": 115 | |
| }, | |
| { | |
| "epoch": 0.9907120743034056, | |
| "grad_norm": 0.12235542685054333, | |
| "learning_rate": 1.1942027918618076e-05, | |
| "loss": 1.0135, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 1.0247678018575852, | |
| "grad_norm": 0.15537117537160547, | |
| "learning_rate": 1.1227474300715056e-05, | |
| "loss": 0.9998, | |
| "step": 125 | |
| }, | |
| { | |
| "epoch": 1.066047471620227, | |
| "grad_norm": 0.135345591232645, | |
| "learning_rate": 1.0506491688387128e-05, | |
| "loss": 0.9884, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 1.107327141382869, | |
| "grad_norm": 0.12431806316772155, | |
| "learning_rate": 9.782856285496494e-06, | |
| "loss": 0.9699, | |
| "step": 135 | |
| }, | |
| { | |
| "epoch": 1.1486068111455108, | |
| "grad_norm": 0.13879009526242994, | |
| "learning_rate": 9.060358190107235e-06, | |
| "loss": 0.9526, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 1.1898864809081529, | |
| "grad_norm": 0.12717946885931922, | |
| "learning_rate": 8.342781543544799e-06, | |
| "loss": 0.9655, | |
| "step": 145 | |
| }, | |
| { | |
| "epoch": 1.2311661506707947, | |
| "grad_norm": 0.12892351453778872, | |
| "learning_rate": 7.633884710654383e-06, | |
| "loss": 0.9771, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 1.2724458204334366, | |
| "grad_norm": 0.12611153356544771, | |
| "learning_rate": 6.937380595065686e-06, | |
| "loss": 0.9431, | |
| "step": 155 | |
| }, | |
| { | |
| "epoch": 1.3137254901960784, | |
| "grad_norm": 0.12541315034043007, | |
| "learning_rate": 6.2569171925643915e-06, | |
| "loss": 0.9388, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 1.3550051599587203, | |
| "grad_norm": 0.11909992847099143, | |
| "learning_rate": 5.5960584844236565e-06, | |
| "loss": 0.9503, | |
| "step": 165 | |
| }, | |
| { | |
| "epoch": 1.3962848297213624, | |
| "grad_norm": 0.12075323476100178, | |
| "learning_rate": 4.958265770768315e-06, | |
| "loss": 0.9574, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 1.437564499484004, | |
| "grad_norm": 0.12177362606151067, | |
| "learning_rate": 4.34687954173974e-06, | |
| "loss": 0.956, | |
| "step": 175 | |
| }, | |
| { | |
| "epoch": 1.478844169246646, | |
| "grad_norm": 0.1230932967148576, | |
| "learning_rate": 3.7651019814126656e-06, | |
| "loss": 0.9343, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 1.520123839009288, | |
| "grad_norm": 0.11921943724872856, | |
| "learning_rate": 3.215980196101002e-06, | |
| "loss": 0.9573, | |
| "step": 185 | |
| }, | |
| { | |
| "epoch": 1.5614035087719298, | |
| "grad_norm": 0.11176701701622194, | |
| "learning_rate": 2.7023902548958193e-06, | |
| "loss": 0.9492, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 1.6026831785345719, | |
| "grad_norm": 0.11546689796712385, | |
| "learning_rate": 2.2270221260243675e-06, | |
| "loss": 0.9309, | |
| "step": 195 | |
| }, | |
| { | |
| "epoch": 1.6439628482972135, | |
| "grad_norm": 0.11779816575572202, | |
| "learning_rate": 1.7923655879272395e-06, | |
| "loss": 0.9383, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 1.6439628482972135, | |
| "eval_loss": 1.0228246450424194, | |
| "eval_runtime": 1.4581, | |
| "eval_samples_per_second": 16.46, | |
| "eval_steps_per_second": 2.057, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 1.6852425180598556, | |
| "grad_norm": 0.11119335035958992, | |
| "learning_rate": 1.4006971888454324e-06, | |
| "loss": 0.9379, | |
| "step": 205 | |
| }, | |
| { | |
| "epoch": 1.7265221878224974, | |
| "grad_norm": 0.11484496155186044, | |
| "learning_rate": 1.0540683232176307e-06, | |
| "loss": 0.9537, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 1.7678018575851393, | |
| "grad_norm": 0.11415468044875361, | |
| "learning_rate": 7.542944873384106e-07, | |
| "loss": 0.9527, | |
| "step": 215 | |
| }, | |
| { | |
| "epoch": 1.8090815273477814, | |
| "grad_norm": 0.11205413468590845, | |
| "learning_rate": 5.029457705517793e-07, | |
| "loss": 0.938, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 1.850361197110423, | |
| "grad_norm": 0.1135948106196872, | |
| "learning_rate": 3.0133863178318237e-07, | |
| "loss": 0.9664, | |
| "step": 225 | |
| }, | |
| { | |
| "epoch": 1.891640866873065, | |
| "grad_norm": 0.11128328680253924, | |
| "learning_rate": 1.5052900448100815e-07, | |
| "loss": 0.9418, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 1.932920536635707, | |
| "grad_norm": 0.11332409865653205, | |
| "learning_rate": 5.1306766081048456e-08, | |
| "loss": 0.9604, | |
| "step": 235 | |
| }, | |
| { | |
| "epoch": 1.9742002063983488, | |
| "grad_norm": 0.11189144523888174, | |
| "learning_rate": 4.1916009605058594e-09, | |
| "loss": 0.9453, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 1.9907120743034055, | |
| "step": 242, | |
| "total_flos": 5.939028700430336e+16, | |
| "train_loss": 1.0744690299034119, | |
| "train_runtime": 1891.5529, | |
| "train_samples_per_second": 4.098, | |
| "train_steps_per_second": 0.128 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 242, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 2, | |
| "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": 5.939028700430336e+16, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |