Text Generation
Transformers
Safetensors
llama
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo") model = AutoModelForCausalLM.from_pretrained("skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo", 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 skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo
- SGLang
How to use skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo 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 "skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo" \ --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": "skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo", "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 "skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo" \ --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": "skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo with Docker Model Runner:
docker model run hf.co/skyai798/STAR-1_DeepSeek-R1-Distill-Llama-8B_sft-complete-dpo
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.9047619047619047, | |
| "eval_steps": 500, | |
| "global_step": 20, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.19047619047619047, | |
| "grad_norm": 115.44032311397486, | |
| "learning_rate": 9.931806517013612e-06, | |
| "logits/chosen": -2.1214675903320312, | |
| "logits/rejected": -2.09596586227417, | |
| "logps/chosen": -107.49108123779297, | |
| "logps/rejected": -15.508064270019531, | |
| "loss": 0.6931, | |
| "rewards/accuracies": 0.0, | |
| "rewards/chosen": 0.0, | |
| "rewards/margins": 0.0, | |
| "rewards/rejected": 0.0, | |
| "step": 2 | |
| }, | |
| { | |
| "epoch": 0.38095238095238093, | |
| "grad_norm": 313.3498585768591, | |
| "learning_rate": 9.397368756032445e-06, | |
| "logits/chosen": -2.0437583923339844, | |
| "logits/rejected": -2.048534393310547, | |
| "logps/chosen": -121.86276245117188, | |
| "logps/rejected": -16.88058090209961, | |
| "loss": 0.9007, | |
| "rewards/accuracies": 0.5625, | |
| "rewards/chosen": -0.31137895584106445, | |
| "rewards/margins": -0.054485566914081573, | |
| "rewards/rejected": -0.25689342617988586, | |
| "step": 4 | |
| }, | |
| { | |
| "epoch": 0.5714285714285714, | |
| "grad_norm": 455.64541668703777, | |
| "learning_rate": 8.386407858128707e-06, | |
| "logits/chosen": -1.9633965492248535, | |
| "logits/rejected": -2.0469534397125244, | |
| "logps/chosen": -152.4108428955078, | |
| "logps/rejected": -19.865943908691406, | |
| "loss": 2.869, | |
| "rewards/accuracies": 0.25, | |
| "rewards/chosen": -3.2351627349853516, | |
| "rewards/margins": -2.399106502532959, | |
| "rewards/rejected": -0.8360563516616821, | |
| "step": 6 | |
| }, | |
| { | |
| "epoch": 0.7619047619047619, | |
| "grad_norm": 249.13606400963317, | |
| "learning_rate": 7.008477123264849e-06, | |
| "logits/chosen": -2.021455764770508, | |
| "logits/rejected": -2.0236542224884033, | |
| "logps/chosen": -156.01495361328125, | |
| "logps/rejected": -31.431161880493164, | |
| "loss": 3.0671, | |
| "rewards/accuracies": 0.21875, | |
| "rewards/chosen": -4.389909267425537, | |
| "rewards/margins": -2.582636594772339, | |
| "rewards/rejected": -1.8072729110717773, | |
| "step": 8 | |
| }, | |
| { | |
| "epoch": 0.9523809523809523, | |
| "grad_norm": 189.45328579107624, | |
| "learning_rate": 5.412896727361663e-06, | |
| "logits/chosen": -2.025608539581299, | |
| "logits/rejected": -2.0653796195983887, | |
| "logps/chosen": -149.14700317382812, | |
| "logps/rejected": -42.3158073425293, | |
| "loss": 1.3723, | |
| "rewards/accuracies": 0.5, | |
| "rewards/chosen": -3.427455425262451, | |
| "rewards/margins": -0.4787706732749939, | |
| "rewards/rejected": -2.9486846923828125, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 1.1428571428571428, | |
| "grad_norm": 244.97288427388463, | |
| "learning_rate": 3.7725725642960047e-06, | |
| "logits/chosen": -2.0566327571868896, | |
| "logits/rejected": -2.057169198989868, | |
| "logps/chosen": -126.93424987792969, | |
| "logps/rejected": -56.91143035888672, | |
| "loss": 1.9476, | |
| "rewards/accuracies": 0.875, | |
| "rewards/chosen": -1.397817850112915, | |
| "rewards/margins": 3.1280388832092285, | |
| "rewards/rejected": -4.525856971740723, | |
| "step": 12 | |
| }, | |
| { | |
| "epoch": 1.3333333333333333, | |
| "grad_norm": 183.45909354907522, | |
| "learning_rate": 2.265259209387867e-06, | |
| "logits/chosen": -2.049287796020508, | |
| "logits/rejected": -2.0284643173217773, | |
| "logps/chosen": -130.31076049804688, | |
| "logps/rejected": -76.90144348144531, | |
| "loss": 0.5622, | |
| "rewards/accuracies": 0.90625, | |
| "rewards/chosen": 1.7893621921539307, | |
| "rewards/margins": 8.1104154586792, | |
| "rewards/rejected": -6.3210530281066895, | |
| "step": 14 | |
| }, | |
| { | |
| "epoch": 1.5238095238095237, | |
| "grad_norm": 123.873213446449, | |
| "learning_rate": 1.0542974530180327e-06, | |
| "logits/chosen": -2.060037136077881, | |
| "logits/rejected": -2.0083541870117188, | |
| "logps/chosen": -103.64411926269531, | |
| "logps/rejected": -78.95755004882812, | |
| "loss": 0.2122, | |
| "rewards/accuracies": 0.90625, | |
| "rewards/chosen": 2.1228506565093994, | |
| "rewards/margins": 8.57053279876709, | |
| "rewards/rejected": -6.447681903839111, | |
| "step": 16 | |
| }, | |
| { | |
| "epoch": 1.7142857142857144, | |
| "grad_norm": 23.274773765505252, | |
| "learning_rate": 2.7091379149682683e-07, | |
| "logits/chosen": -2.054797649383545, | |
| "logits/rejected": -1.9887886047363281, | |
| "logps/chosen": -112.17431640625, | |
| "logps/rejected": -83.83834838867188, | |
| "loss": 0.3109, | |
| "rewards/accuracies": 0.90625, | |
| "rewards/chosen": 0.16159486770629883, | |
| "rewards/margins": 7.233631134033203, | |
| "rewards/rejected": -7.0720367431640625, | |
| "step": 18 | |
| }, | |
| { | |
| "epoch": 1.9047619047619047, | |
| "grad_norm": 155.65960541381844, | |
| "learning_rate": 0.0, | |
| "logits/chosen": -2.08943510055542, | |
| "logits/rejected": -2.03725528717041, | |
| "logps/chosen": -96.60086822509766, | |
| "logps/rejected": -91.33654022216797, | |
| "loss": 0.8478, | |
| "rewards/accuracies": 0.875, | |
| "rewards/chosen": 0.384034126996994, | |
| "rewards/margins": 8.193408966064453, | |
| "rewards/rejected": -7.809375286102295, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 1.9047619047619047, | |
| "step": 20, | |
| "total_flos": 474810286080.0, | |
| "train_loss": 1.2783152908086777, | |
| "train_runtime": 432.4363, | |
| "train_samples_per_second": 0.777, | |
| "train_steps_per_second": 0.046 | |
| } | |
| ], | |
| "logging_steps": 2, | |
| "max_steps": 20, | |
| "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": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 474810286080.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |