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
| {"current_steps": 10, "total_steps": 183, "loss": 0.5427, "learning_rate": 5.263157894736842e-06, "epoch": 0.05442176870748299, "percentage": 5.46, "elapsed_time": "0:02:30", "remaining_time": "0:43:18"} | |
| {"current_steps": 20, "total_steps": 183, "loss": 0.2565, "learning_rate": 9.999082642158972e-06, "epoch": 0.10884353741496598, "percentage": 10.93, "elapsed_time": "0:05:00", "remaining_time": "0:40:48"} | |
| {"current_steps": 30, "total_steps": 183, "loss": 0.1904, "learning_rate": 9.889406426751296e-06, "epoch": 0.16326530612244897, "percentage": 16.39, "elapsed_time": "0:07:30", "remaining_time": "0:38:15"} | |
| {"current_steps": 40, "total_steps": 183, "loss": 0.1684, "learning_rate": 9.600859295816708e-06, "epoch": 0.21768707482993196, "percentage": 21.86, "elapsed_time": "0:10:00", "remaining_time": "0:35:45"} | |
| {"current_steps": 50, "total_steps": 183, "loss": 0.1598, "learning_rate": 9.143997272924974e-06, "epoch": 0.272108843537415, "percentage": 27.32, "elapsed_time": "0:12:29", "remaining_time": "0:33:13"} | |
| {"current_steps": 60, "total_steps": 183, "loss": 0.1569, "learning_rate": 8.535533905932739e-06, "epoch": 0.32653061224489793, "percentage": 32.79, "elapsed_time": "0:14:59", "remaining_time": "0:30:44"} | |
| {"current_steps": 70, "total_steps": 183, "loss": 0.1457, "learning_rate": 7.797728829245321e-06, "epoch": 0.38095238095238093, "percentage": 38.25, "elapsed_time": "0:17:29", "remaining_time": "0:28:14"} | |
| {"current_steps": 80, "total_steps": 183, "loss": 0.1409, "learning_rate": 6.957573431597646e-06, "epoch": 0.43537414965986393, "percentage": 43.72, "elapsed_time": "0:20:00", "remaining_time": "0:25:45"} | |
| {"current_steps": 90, "total_steps": 183, "loss": 0.1408, "learning_rate": 6.045803420363085e-06, "epoch": 0.4897959183673469, "percentage": 49.18, "elapsed_time": "0:22:30", "remaining_time": "0:23:15"} | |
| {"current_steps": 100, "total_steps": 183, "loss": 0.1394, "learning_rate": 5.095774406105572e-06, "epoch": 0.54421768707483, "percentage": 54.64, "elapsed_time": "0:25:00", "remaining_time": "0:20:45"} | |
| {"current_steps": 110, "total_steps": 183, "loss": 0.1351, "learning_rate": 4.142241642270109e-06, "epoch": 0.5986394557823129, "percentage": 60.11, "elapsed_time": "0:27:30", "remaining_time": "0:18:15"} | |
| {"current_steps": 120, "total_steps": 183, "loss": 0.1346, "learning_rate": 3.2200885612338846e-06, "epoch": 0.6530612244897959, "percentage": 65.57, "elapsed_time": "0:30:00", "remaining_time": "0:15:45"} | |
| {"current_steps": 130, "total_steps": 183, "loss": 0.1321, "learning_rate": 2.363050621141354e-06, "epoch": 0.7074829931972789, "percentage": 71.04, "elapsed_time": "0:32:29", "remaining_time": "0:13:14"} | |
| {"current_steps": 140, "total_steps": 183, "loss": 0.1289, "learning_rate": 1.6024811494939723e-06, "epoch": 0.7619047619047619, "percentage": 76.5, "elapsed_time": "0:34:59", "remaining_time": "0:10:44"} | |
| {"current_steps": 150, "total_steps": 183, "loss": 0.1329, "learning_rate": 9.662043330828086e-07, "epoch": 0.8163265306122449, "percentage": 81.97, "elapsed_time": "0:37:29", "remaining_time": "0:08:14"} | |
| {"current_steps": 160, "total_steps": 183, "loss": 0.1287, "learning_rate": 4.77497315746292e-07, "epoch": 0.8707482993197279, "percentage": 87.43, "elapsed_time": "0:39:59", "remaining_time": "0:05:44"} | |
| {"current_steps": 170, "total_steps": 183, "loss": 0.1313, "learning_rate": 1.542386422372405e-07, "epoch": 0.9251700680272109, "percentage": 92.9, "elapsed_time": "0:42:29", "remaining_time": "0:03:14"} | |
| {"current_steps": 180, "total_steps": 183, "loss": 0.1287, "learning_rate": 8.254200983794369e-09, "epoch": 0.9795918367346939, "percentage": 98.36, "elapsed_time": "0:44:59", "remaining_time": "0:00:44"} | |
| {"current_steps": 183, "total_steps": 183, "epoch": 0.9959183673469387, "percentage": 100.0, "elapsed_time": "0:46:18", "remaining_time": "0:00:00"} | |