Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use HappyBie/blpt0508 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HappyBie/blpt0508 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HappyBie/blpt0508") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HappyBie/blpt0508") model = AutoModelForCausalLM.from_pretrained("HappyBie/blpt0508") 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 HappyBie/blpt0508 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HappyBie/blpt0508" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HappyBie/blpt0508", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HappyBie/blpt0508
- SGLang
How to use HappyBie/blpt0508 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 "HappyBie/blpt0508" \ --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": "HappyBie/blpt0508", "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 "HappyBie/blpt0508" \ --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": "HappyBie/blpt0508", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HappyBie/blpt0508 with Docker Model Runner:
docker model run hf.co/HappyBie/blpt0508
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9959183673469387, | |
| "eval_steps": 500, | |
| "global_step": 183, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.05442176870748299, | |
| "grad_norm": 0.8557426789173155, | |
| "learning_rate": 5.263157894736842e-06, | |
| "loss": 0.5427, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.10884353741496598, | |
| "grad_norm": 0.5773100036749792, | |
| "learning_rate": 9.999082642158972e-06, | |
| "loss": 0.2565, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.16326530612244897, | |
| "grad_norm": 0.32703435839603495, | |
| "learning_rate": 9.889406426751296e-06, | |
| "loss": 0.1904, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.21768707482993196, | |
| "grad_norm": 0.2936812973789233, | |
| "learning_rate": 9.600859295816708e-06, | |
| "loss": 0.1684, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.272108843537415, | |
| "grad_norm": 0.28104703021304783, | |
| "learning_rate": 9.143997272924974e-06, | |
| "loss": 0.1598, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.32653061224489793, | |
| "grad_norm": 0.26954904753203757, | |
| "learning_rate": 8.535533905932739e-06, | |
| "loss": 0.1569, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.38095238095238093, | |
| "grad_norm": 0.291504420774206, | |
| "learning_rate": 7.797728829245321e-06, | |
| "loss": 0.1457, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.43537414965986393, | |
| "grad_norm": 0.25827004955042715, | |
| "learning_rate": 6.957573431597646e-06, | |
| "loss": 0.1409, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.4897959183673469, | |
| "grad_norm": 0.24280116398532822, | |
| "learning_rate": 6.045803420363085e-06, | |
| "loss": 0.1408, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.54421768707483, | |
| "grad_norm": 0.24208489602841532, | |
| "learning_rate": 5.095774406105572e-06, | |
| "loss": 0.1394, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.5986394557823129, | |
| "grad_norm": 0.2349560405963224, | |
| "learning_rate": 4.142241642270109e-06, | |
| "loss": 0.1351, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.6530612244897959, | |
| "grad_norm": 0.25391577143340344, | |
| "learning_rate": 3.2200885612338846e-06, | |
| "loss": 0.1346, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.7074829931972789, | |
| "grad_norm": 0.2574709793724405, | |
| "learning_rate": 2.363050621141354e-06, | |
| "loss": 0.1321, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.7619047619047619, | |
| "grad_norm": 0.2516339669374057, | |
| "learning_rate": 1.6024811494939723e-06, | |
| "loss": 0.1289, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.8163265306122449, | |
| "grad_norm": 0.25243707311103075, | |
| "learning_rate": 9.662043330828086e-07, | |
| "loss": 0.1329, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.8707482993197279, | |
| "grad_norm": 0.26216650012490306, | |
| "learning_rate": 4.77497315746292e-07, | |
| "loss": 0.1287, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.9251700680272109, | |
| "grad_norm": 0.2508304182626654, | |
| "learning_rate": 1.542386422372405e-07, | |
| "loss": 0.1313, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.9795918367346939, | |
| "grad_norm": 0.3217053310284403, | |
| "learning_rate": 8.254200983794369e-09, | |
| "loss": 0.1287, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.9959183673469387, | |
| "step": 183, | |
| "total_flos": 47903301959680.0, | |
| "train_loss": 0.17143813296745383, | |
| "train_runtime": 2778.6239, | |
| "train_samples_per_second": 8.458, | |
| "train_steps_per_second": 0.066 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 183, | |
| "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": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 47903301959680.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |