Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use 17Lab/qwen1.5b-full-sft-s13 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 17Lab/qwen1.5b-full-sft-s13 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="17Lab/qwen1.5b-full-sft-s13") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("17Lab/qwen1.5b-full-sft-s13") model = AutoModelForCausalLM.from_pretrained("17Lab/qwen1.5b-full-sft-s13", 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 17Lab/qwen1.5b-full-sft-s13 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "17Lab/qwen1.5b-full-sft-s13" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "17Lab/qwen1.5b-full-sft-s13", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/17Lab/qwen1.5b-full-sft-s13
- SGLang
How to use 17Lab/qwen1.5b-full-sft-s13 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 "17Lab/qwen1.5b-full-sft-s13" \ --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": "17Lab/qwen1.5b-full-sft-s13", "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 "17Lab/qwen1.5b-full-sft-s13" \ --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": "17Lab/qwen1.5b-full-sft-s13", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 17Lab/qwen1.5b-full-sft-s13 with Docker Model Runner:
docker model run hf.co/17Lab/qwen1.5b-full-sft-s13
| {"current_steps": 5, "total_steps": 114, "loss": 3.100375747680664, "lr": 3.3333333333333335e-05, "epoch": 0.13157894736842105, "percentage": 4.39, "elapsed_time": "0:00:02", "remaining_time": "0:00:56"} | |
| {"current_steps": 10, "total_steps": 114, "loss": 0.7916615962982178, "lr": 4.990486745229364e-05, "epoch": 0.2631578947368421, "percentage": 8.77, "elapsed_time": "0:00:04", "remaining_time": "0:00:44"} | |
| {"current_steps": 15, "total_steps": 114, "loss": 0.2971171855926514, "lr": 4.9326121764495596e-05, "epoch": 0.39473684210526316, "percentage": 13.16, "elapsed_time": "0:00:05", "remaining_time": "0:00:39"} | |
| {"current_steps": 20, "total_steps": 114, "loss": 0.20022857189178467, "lr": 4.823368810567056e-05, "epoch": 0.5263157894736842, "percentage": 17.54, "elapsed_time": "0:00:07", "remaining_time": "0:00:35"} | |
| {"current_steps": 25, "total_steps": 114, "loss": 0.1185336947441101, "lr": 4.665063509461097e-05, "epoch": 0.6578947368421053, "percentage": 21.93, "elapsed_time": "0:00:09", "remaining_time": "0:00:33"} | |
| {"current_steps": 30, "total_steps": 114, "loss": 0.05945125222206116, "lr": 4.4610391622989396e-05, "epoch": 0.7894736842105263, "percentage": 26.32, "elapsed_time": "0:00:11", "remaining_time": "0:00:30"} | |
| {"current_steps": 35, "total_steps": 114, "loss": 0.04002172350883484, "lr": 4.215604094671835e-05, "epoch": 0.9210526315789473, "percentage": 30.7, "elapsed_time": "0:00:12", "remaining_time": "0:00:28"} | |
| {"current_steps": 40, "total_steps": 114, "loss": 0.020497632026672364, "lr": 3.933941090877615e-05, "epoch": 1.0526315789473684, "percentage": 35.09, "elapsed_time": "0:00:14", "remaining_time": "0:00:26"} | |
| {"current_steps": 45, "total_steps": 114, "loss": 0.012034893035888672, "lr": 3.621997950501156e-05, "epoch": 1.1842105263157894, "percentage": 39.47, "elapsed_time": "0:00:16", "remaining_time": "0:00:24"} | |
| {"current_steps": 50, "total_steps": 114, "loss": 0.0003852380206808448, "lr": 3.2863618903790346e-05, "epoch": 1.3157894736842106, "percentage": 43.86, "elapsed_time": "0:00:17", "remaining_time": "0:00:22"} | |
| {"current_steps": 50, "total_steps": 114, "eval_loss": 8.908205199986696e-05, "epoch": 1.3157894736842106, "percentage": 43.86, "elapsed_time": "0:00:17", "remaining_time": "0:00:23"} | |
| {"current_steps": 55, "total_steps": 114, "loss": 6.551978876814246e-05, "lr": 2.9341204441673266e-05, "epoch": 1.4473684210526316, "percentage": 48.25, "elapsed_time": "0:01:14", "remaining_time": "0:01:20"} | |
| {"current_steps": 60, "total_steps": 114, "loss": 4.137617652304471e-05, "lr": 2.5727117968577784e-05, "epoch": 1.5789473684210527, "percentage": 52.63, "elapsed_time": "0:01:16", "remaining_time": "0:01:08"} | |
| {"current_steps": 65, "total_steps": 114, "loss": 3.404428716748953e-05, "lr": 2.2097677146869242e-05, "epoch": 1.7105263157894737, "percentage": 57.02, "elapsed_time": "0:01:18", "remaining_time": "0:00:58"} | |
| {"current_steps": 70, "total_steps": 114, "loss": 3.0071102082729338e-05, "lr": 1.852952387243698e-05, "epoch": 1.8421052631578947, "percentage": 61.4, "elapsed_time": "0:01:19", "remaining_time": "0:00:50"} | |
| {"current_steps": 75, "total_steps": 114, "loss": 2.7886469615623356e-05, "lr": 1.509800584902108e-05, "epoch": 1.973684210526316, "percentage": 65.79, "elapsed_time": "0:01:21", "remaining_time": "0:00:42"} | |
| {"current_steps": 80, "total_steps": 114, "loss": 2.677349839359522e-05, "lr": 1.1875585491636e-05, "epoch": 2.1052631578947367, "percentage": 70.18, "elapsed_time": "0:01:23", "remaining_time": "0:00:35"} | |
| {"current_steps": 85, "total_steps": 114, "loss": 2.9993365751579403e-05, "lr": 8.930309757836517e-06, "epoch": 2.236842105263158, "percentage": 74.56, "elapsed_time": "0:01:24", "remaining_time": "0:00:28"} | |
| {"current_steps": 90, "total_steps": 114, "loss": 2.560944703873247e-05, "lr": 6.324373218975105e-06, "epoch": 2.3684210526315788, "percentage": 78.95, "elapsed_time": "0:01:26", "remaining_time": "0:00:23"} | |
| {"current_steps": 95, "total_steps": 114, "loss": 2.5494518922641873e-05, "lr": 4.112804714676594e-06, "epoch": 2.5, "percentage": 83.33, "elapsed_time": "0:01:28", "remaining_time": "0:00:17"} | |
| {"current_steps": 100, "total_steps": 114, "loss": 2.499283873476088e-05, "lr": 2.3423053240837515e-06, "epoch": 2.6315789473684212, "percentage": 87.72, "elapsed_time": "0:01:29", "remaining_time": "0:00:12"} | |
| {"current_steps": 100, "total_steps": 114, "eval_loss": 2.4945922632468864e-05, "epoch": 2.6315789473684212, "percentage": 87.72, "elapsed_time": "0:01:30", "remaining_time": "0:00:12"} | |
| {"current_steps": 105, "total_steps": 114, "loss": 2.4992326507344843e-05, "lr": 1.0502621921127776e-06, "epoch": 2.763157894736842, "percentage": 92.11, "elapsed_time": "0:02:24", "remaining_time": "0:00:12"} | |
| {"current_steps": 110, "total_steps": 114, "loss": 2.493572246748954e-05, "lr": 2.6395903547638825e-07, "epoch": 2.8947368421052633, "percentage": 96.49, "elapsed_time": "0:02:25", "remaining_time": "0:00:05"} | |
| {"current_steps": 114, "total_steps": 114, "eval_loss": 2.4861023121047765e-05, "epoch": 3.0, "percentage": 100.0, "elapsed_time": "0:02:27", "remaining_time": "0:00:00"} | |
| {"current_steps": 114, "total_steps": 114, "epoch": 3.0, "percentage": 100.0, "elapsed_time": "0:03:20", "remaining_time": "0:00:00"} | |