Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use HappyBie/blpt0319 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HappyBie/blpt0319 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HappyBie/blpt0319") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HappyBie/blpt0319") model = AutoModelForCausalLM.from_pretrained("HappyBie/blpt0319") 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/blpt0319 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HappyBie/blpt0319" # 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/blpt0319", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HappyBie/blpt0319
- SGLang
How to use HappyBie/blpt0319 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/blpt0319" \ --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/blpt0319", "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/blpt0319" \ --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/blpt0319", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HappyBie/blpt0319 with Docker Model Runner:
docker model run hf.co/HappyBie/blpt0319
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9988851727982163, | |
| "eval_steps": 500, | |
| "global_step": 224, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.044593088071348944, | |
| "grad_norm": 1.3298993879930503, | |
| "learning_rate": 4.347826086956522e-06, | |
| "loss": 0.8838, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.08918617614269789, | |
| "grad_norm": 0.7761384469317142, | |
| "learning_rate": 8.695652173913044e-06, | |
| "loss": 0.5643, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.13377926421404682, | |
| "grad_norm": 0.7388880857506953, | |
| "learning_rate": 9.970104180843881e-06, | |
| "loss": 0.5064, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.17837235228539577, | |
| "grad_norm": 0.724653222623146, | |
| "learning_rate": 9.8245356575224e-06, | |
| "loss": 0.4889, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.2229654403567447, | |
| "grad_norm": 0.5993960298183308, | |
| "learning_rate": 9.561347763324484e-06, | |
| "loss": 0.4955, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.26755852842809363, | |
| "grad_norm": 0.6058266855598197, | |
| "learning_rate": 9.186956865904004e-06, | |
| "loss": 0.4677, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.31215161649944256, | |
| "grad_norm": 0.5660093789707933, | |
| "learning_rate": 8.710490397400007e-06, | |
| "loss": 0.4661, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.35674470457079155, | |
| "grad_norm": 0.5427662696911218, | |
| "learning_rate": 8.143564332954426e-06, | |
| "loss": 0.4699, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.4013377926421405, | |
| "grad_norm": 0.664420778167954, | |
| "learning_rate": 7.500000000000001e-06, | |
| "loss": 0.4601, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.4459308807134894, | |
| "grad_norm": 0.5927500300049297, | |
| "learning_rate": 6.795487122343124e-06, | |
| "loss": 0.4591, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.49052396878483834, | |
| "grad_norm": 0.49071930107510425, | |
| "learning_rate": 6.047201313830724e-06, | |
| "loss": 0.4568, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.5351170568561873, | |
| "grad_norm": 0.5210863039113355, | |
| "learning_rate": 5.2733853468829295e-06, | |
| "loss": 0.4436, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.5797101449275363, | |
| "grad_norm": 0.5959809226999278, | |
| "learning_rate": 4.492904404320942e-06, | |
| "loss": 0.4535, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.6243032329988851, | |
| "grad_norm": 0.5211561870266984, | |
| "learning_rate": 3.7247861571916183e-06, | |
| "loss": 0.46, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.6688963210702341, | |
| "grad_norm": 0.5179371520272593, | |
| "learning_rate": 2.9877568812237325e-06, | |
| "loss": 0.4489, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.7134894091415831, | |
| "grad_norm": 0.5537839499631814, | |
| "learning_rate": 2.299784921126622e-06, | |
| "loss": 0.4638, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.758082497212932, | |
| "grad_norm": 0.46909498015980716, | |
| "learning_rate": 1.677642632805892e-06, | |
| "loss": 0.4537, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.802675585284281, | |
| "grad_norm": 0.4665216166420411, | |
| "learning_rate": 1.1364974830899438e-06, | |
| "loss": 0.4411, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.8472686733556298, | |
| "grad_norm": 0.5078988510841556, | |
| "learning_rate": 6.895422757179682e-07, | |
| "loss": 0.4475, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.8918617614269788, | |
| "grad_norm": 0.5090664794586085, | |
| "learning_rate": 3.4767351846456744e-07, | |
| "loss": 0.4483, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.9364548494983278, | |
| "grad_norm": 0.46716721186961896, | |
| "learning_rate": 1.1922577262327374e-07, | |
| "loss": 0.459, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.9810479375696767, | |
| "grad_norm": 0.47165862326587277, | |
| "learning_rate": 9.768461253920614e-09, | |
| "loss": 0.4392, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.9988851727982163, | |
| "step": 224, | |
| "total_flos": 43988224573440.0, | |
| "train_loss": 0.4852701084954398, | |
| "train_runtime": 6118.0115, | |
| "train_samples_per_second": 3.518, | |
| "train_steps_per_second": 0.037 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 224, | |
| "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": 43988224573440.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |