Instructions to use 17Lab/qwen3b-lora-sft-s13 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use 17Lab/qwen3b-lora-sft-s13 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B") model = PeftModel.from_pretrained(base_model, "17Lab/qwen3b-lora-sft-s13") - Transformers
How to use 17Lab/qwen3b-lora-sft-s13 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="17Lab/qwen3b-lora-sft-s13") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("17Lab/qwen3b-lora-sft-s13", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 17Lab/qwen3b-lora-sft-s13 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "17Lab/qwen3b-lora-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/qwen3b-lora-sft-s13", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/17Lab/qwen3b-lora-sft-s13
- SGLang
How to use 17Lab/qwen3b-lora-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/qwen3b-lora-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/qwen3b-lora-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/qwen3b-lora-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/qwen3b-lora-sft-s13", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 17Lab/qwen3b-lora-sft-s13 with Docker Model Runner:
docker model run hf.co/17Lab/qwen3b-lora-sft-s13
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.0, | |
| "eval_steps": 50, | |
| "global_step": 114, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.13157894736842105, | |
| "grad_norm": 2.8724489212036133, | |
| "learning_rate": 9.999999999999999e-05, | |
| "loss": 3.2117641448974608, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.2631578947368421, | |
| "grad_norm": 3.8114724159240723, | |
| "learning_rate": 0.0001497146023568809, | |
| "loss": 1.3626741409301757, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.39473684210526316, | |
| "grad_norm": 2.2762057781219482, | |
| "learning_rate": 0.00014797836529348678, | |
| "loss": 0.37534074783325194, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.5263157894736842, | |
| "grad_norm": 0.8772661089897156, | |
| "learning_rate": 0.00014470106431701166, | |
| "loss": 0.25732452869415284, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.6578947368421053, | |
| "grad_norm": 0.28068816661834717, | |
| "learning_rate": 0.0001399519052838329, | |
| "loss": 0.22821950912475586, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.7894736842105263, | |
| "grad_norm": 0.37059611082077026, | |
| "learning_rate": 0.00013383117486896816, | |
| "loss": 0.21986465454101561, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.9210526315789473, | |
| "grad_norm": 0.21363650262355804, | |
| "learning_rate": 0.000126468122840155, | |
| "loss": 0.19870233535766602, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 1.0526315789473684, | |
| "grad_norm": 0.29518723487854004, | |
| "learning_rate": 0.00011801823272632844, | |
| "loss": 0.18972501754760743, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 1.1842105263157894, | |
| "grad_norm": 0.16845785081386566, | |
| "learning_rate": 0.00010865993851503467, | |
| "loss": 0.18694405555725097, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 1.3157894736842106, | |
| "grad_norm": 0.18659795820713043, | |
| "learning_rate": 9.859085671137102e-05, | |
| "loss": 0.18443360328674316, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 1.3157894736842106, | |
| "eval_loss": 0.18096967041492462, | |
| "eval_runtime": 0.514, | |
| "eval_samples_per_second": 486.415, | |
| "eval_steps_per_second": 15.565, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 1.4473684210526316, | |
| "grad_norm": 0.09704450517892838, | |
| "learning_rate": 8.802361332501978e-05, | |
| "loss": 0.17949447631835938, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 1.5789473684210527, | |
| "grad_norm": 0.149698406457901, | |
| "learning_rate": 7.718135390573335e-05, | |
| "loss": 0.17545132637023925, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 1.7105263157894737, | |
| "grad_norm": 0.4086472988128662, | |
| "learning_rate": 6.629303144060771e-05, | |
| "loss": 0.16337993144989013, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 1.8421052631578947, | |
| "grad_norm": 0.2512857913970947, | |
| "learning_rate": 5.558857161731093e-05, | |
| "loss": 0.15300323963165283, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 1.973684210526316, | |
| "grad_norm": 0.1288457214832306, | |
| "learning_rate": 4.529401754706323e-05, | |
| "loss": 0.1532054901123047, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 2.1052631578947367, | |
| "grad_norm": 0.10154800862073898, | |
| "learning_rate": 3.562675647490799e-05, | |
| "loss": 0.1503889560699463, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 2.236842105263158, | |
| "grad_norm": 0.010364431887865067, | |
| "learning_rate": 2.6790929273509545e-05, | |
| "loss": 0.15022125244140624, | |
| "step": 85 | |
| }, | |
| { | |
| "epoch": 2.3684210526315788, | |
| "grad_norm": 0.0075685251504182816, | |
| "learning_rate": 1.897311965692531e-05, | |
| "loss": 0.15019209384918214, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 2.5, | |
| "grad_norm": 0.007590321823954582, | |
| "learning_rate": 1.2338414144029779e-05, | |
| "loss": 0.15014156103134155, | |
| "step": 95 | |
| }, | |
| { | |
| "epoch": 2.6315789473684212, | |
| "grad_norm": 0.004777102265506983, | |
| "learning_rate": 7.026915972251254e-06, | |
| "loss": 0.15012743473052978, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 2.6315789473684212, | |
| "eval_loss": 0.15011924505233765, | |
| "eval_runtime": 0.4989, | |
| "eval_samples_per_second": 501.08, | |
| "eval_steps_per_second": 16.035, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 2.763157894736842, | |
| "grad_norm": 0.004256995860487223, | |
| "learning_rate": 3.150786576338332e-06, | |
| "loss": 0.15010836124420165, | |
| "step": 105 | |
| }, | |
| { | |
| "epoch": 2.8947368421052633, | |
| "grad_norm": 0.004810058977454901, | |
| "learning_rate": 7.918771064291645e-07, | |
| "loss": 0.1501091480255127, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 0.15010888874530792, | |
| "eval_runtime": 0.4909, | |
| "eval_samples_per_second": 509.265, | |
| "eval_steps_per_second": 16.296, | |
| "step": 114 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "step": 114, | |
| "total_flos": 3.851983523518874e+16, | |
| "train_loss": 0.3688990599230716, | |
| "train_runtime": 95.5617, | |
| "train_samples_per_second": 149.118, | |
| "train_steps_per_second": 1.193 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 114, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 50, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 3.851983523518874e+16, | |
| "train_batch_size": 16, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |