Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use 17Lab/qwen7b-full-sft-s13 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 17Lab/qwen7b-full-sft-s13 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="17Lab/qwen7b-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/qwen7b-full-sft-s13") model = AutoModelForCausalLM.from_pretrained("17Lab/qwen7b-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/qwen7b-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/qwen7b-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/qwen7b-full-sft-s13", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/17Lab/qwen7b-full-sft-s13
- SGLang
How to use 17Lab/qwen7b-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/qwen7b-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/qwen7b-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/qwen7b-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/qwen7b-full-sft-s13", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 17Lab/qwen7b-full-sft-s13 with Docker Model Runner:
docker model run hf.co/17Lab/qwen7b-full-sft-s13
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.0, | |
| "eval_steps": 50, | |
| "global_step": 225, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.06711409395973154, | |
| "grad_norm": 771.0387290625706, | |
| "learning_rate": 6.666666666666667e-06, | |
| "loss": 3.3403587341308594, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.1342281879194631, | |
| "grad_norm": 24.798543146738286, | |
| "learning_rate": 1.5000000000000002e-05, | |
| "loss": 1.2873397827148438, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.20134228187919462, | |
| "grad_norm": 9.663013484017599, | |
| "learning_rate": 1.9995649501315172e-05, | |
| "loss": 0.29829452037811277, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.2684563758389262, | |
| "grad_norm": 5.6477057523539, | |
| "learning_rate": 1.9946749853292233e-05, | |
| "loss": 0.1349006175994873, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.33557046979865773, | |
| "grad_norm": 4.057098021702121, | |
| "learning_rate": 1.9843779142227258e-05, | |
| "loss": 0.07990359663963317, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.40268456375838924, | |
| "grad_norm": 1.914170020073957, | |
| "learning_rate": 1.9687297122400952e-05, | |
| "loss": 0.03623477220535278, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.4697986577181208, | |
| "grad_norm": 0.05978450488009304, | |
| "learning_rate": 1.947815443842424e-05, | |
| "loss": 0.0021600183099508286, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 0.5369127516778524, | |
| "grad_norm": 0.012301196399380163, | |
| "learning_rate": 1.9217488001088784e-05, | |
| "loss": 0.00010623512789607049, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.6040268456375839, | |
| "grad_norm": 0.004193028483875623, | |
| "learning_rate": 1.8906714807059218e-05, | |
| "loss": 2.885170979425311e-05, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.6711409395973155, | |
| "grad_norm": 0.0021696829162455526, | |
| "learning_rate": 1.8547524236003675e-05, | |
| "loss": 1.2394384248182177e-05, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.6711409395973155, | |
| "eval_loss": 9.160361514659598e-06, | |
| "eval_runtime": 2.223, | |
| "eval_samples_per_second": 112.459, | |
| "eval_steps_per_second": 7.197, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.738255033557047, | |
| "grad_norm": 0.001552062897034346, | |
| "learning_rate": 1.8141868867035745e-05, | |
| "loss": 7.670311606489123e-06, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 0.8053691275167785, | |
| "grad_norm": 0.0012379335033009154, | |
| "learning_rate": 1.7691953864390208e-05, | |
| "loss": 5.718640022678301e-06, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.87248322147651, | |
| "grad_norm": 0.0010541000193795753, | |
| "learning_rate": 1.7200224990032577e-05, | |
| "loss": 4.781161987921223e-06, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 0.9395973154362416, | |
| "grad_norm": 0.000928873490914045, | |
| "learning_rate": 1.666935530836651e-05, | |
| "loss": 4.1388742829440165e-06, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 0.0008922235905923142, | |
| "learning_rate": 1.6102230655313076e-05, | |
| "loss": 3.85485400329344e-06, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 1.0671140939597314, | |
| "grad_norm": 0.0008075855123012748, | |
| "learning_rate": 1.5501933950752655e-05, | |
| "loss": 3.514360651024617e-06, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 1.1342281879194631, | |
| "grad_norm": 0.0007917095955772439, | |
| "learning_rate": 1.4871728439607967e-05, | |
| "loss": 3.3707532566040753e-06, | |
| "step": 85 | |
| }, | |
| { | |
| "epoch": 1.2013422818791946, | |
| "grad_norm": 0.0007942119288409565, | |
| "learning_rate": 1.4215039952670482e-05, | |
| "loss": 3.3559525036253033e-06, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 1.2684563758389262, | |
| "grad_norm": 0.0007667582632583201, | |
| "learning_rate": 1.3535438283601437e-05, | |
| "loss": 3.262608515797183e-06, | |
| "step": 95 | |
| }, | |
| { | |
| "epoch": 1.3355704697986577, | |
| "grad_norm": 0.000737964470158104, | |
| "learning_rate": 1.2836617783342968e-05, | |
| "loss": 3.128412936348468e-06, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 1.3355704697986577, | |
| "eval_loss": 3.1148604193731444e-06, | |
| "eval_runtime": 2.0231, | |
| "eval_samples_per_second": 123.573, | |
| "eval_steps_per_second": 7.909, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 1.4026845637583891, | |
| "grad_norm": 0.0007199615576756328, | |
| "learning_rate": 1.2122377277429231e-05, | |
| "loss": 3.0415885703405365e-06, | |
| "step": 105 | |
| }, | |
| { | |
| "epoch": 1.4697986577181208, | |
| "grad_norm": 0.0007126247175517023, | |
| "learning_rate": 1.1396599415368062e-05, | |
| "loss": 2.98672603094019e-06, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 1.5369127516778525, | |
| "grad_norm": 0.0007147228786157012, | |
| "learning_rate": 1.066322956435104e-05, | |
| "loss": 2.9487675419659355e-06, | |
| "step": 115 | |
| }, | |
| { | |
| "epoch": 1.604026845637584, | |
| "grad_norm": 0.000710730245597985, | |
| "learning_rate": 9.926254362026875e-06, | |
| "loss": 2.942025457741693e-06, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 1.6711409395973154, | |
| "grad_norm": 0.0007130604665711499, | |
| "learning_rate": 9.189680044926402e-06, | |
| "loss": 2.926953311543912e-06, | |
| "step": 125 | |
| }, | |
| { | |
| "epoch": 1.738255033557047, | |
| "grad_norm": 0.0007082339750801266, | |
| "learning_rate": 8.457510670346976e-06, | |
| "loss": 2.9204267775639893e-06, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 1.8053691275167785, | |
| "grad_norm": 0.0007212567260949268, | |
| "learning_rate": 7.733726350083331e-06, | |
| "loss": 2.9483762773452327e-06, | |
| "step": 135 | |
| }, | |
| { | |
| "epoch": 1.87248322147651, | |
| "grad_norm": 0.0007020476633877951, | |
| "learning_rate": 7.022261614327448e-06, | |
| "loss": 5.818682257086038e-06, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 1.9395973154362416, | |
| "grad_norm": 0.0006973774426251346, | |
| "learning_rate": 6.326984023352435e-06, | |
| "loss": 2.8704187570838256e-06, | |
| "step": 145 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "grad_norm": 0.000682624605940799, | |
| "learning_rate": 5.651673143248509e-06, | |
| "loss": 2.8186999770696274e-06, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 2.8178355933050625e-06, | |
| "eval_runtime": 2.127, | |
| "eval_samples_per_second": 117.535, | |
| "eval_steps_per_second": 7.522, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 2.0671140939597317, | |
| "grad_norm": 0.0006879802420483138, | |
| "learning_rate": 5.000000000000003e-06, | |
| "loss": 2.7831285478896463e-06, | |
| "step": 155 | |
| }, | |
| { | |
| "epoch": 2.134228187919463, | |
| "grad_norm": 0.0006632420952139857, | |
| "learning_rate": 4.375507123592194e-06, | |
| "loss": 2.7615027647698297e-06, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 2.2013422818791946, | |
| "grad_norm": 0.0006656627025681546, | |
| "learning_rate": 3.781589290629266e-06, | |
| "loss": 2.7448764740256593e-06, | |
| "step": 165 | |
| }, | |
| { | |
| "epoch": 2.2684563758389262, | |
| "grad_norm": 0.0006705715879794475, | |
| "learning_rate": 3.2214750701474875e-06, | |
| "loss": 2.7252637664787473e-06, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 2.335570469798658, | |
| "grad_norm": 0.000668328323821757, | |
| "learning_rate": 2.698209272941659e-06, | |
| "loss": 2.7195979782845826e-06, | |
| "step": 175 | |
| }, | |
| { | |
| "epoch": 2.402684563758389, | |
| "grad_norm": 0.0006694753608437758, | |
| "learning_rate": 2.2146363998111077e-06, | |
| "loss": 2.7082156520918944e-06, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 2.469798657718121, | |
| "grad_norm": 0.0006609888028080037, | |
| "learning_rate": 1.773385178701561e-06, | |
| "loss": 2.6918616640614347e-06, | |
| "step": 185 | |
| }, | |
| { | |
| "epoch": 2.5369127516778525, | |
| "grad_norm": 0.0006616546862766573, | |
| "learning_rate": 1.3768542747997215e-06, | |
| "loss": 2.6803711079992356e-06, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 2.604026845637584, | |
| "grad_norm": 0.0006557050922852907, | |
| "learning_rate": 1.0271992512613239e-06, | |
| "loss": 2.687972482817713e-06, | |
| "step": 195 | |
| }, | |
| { | |
| "epoch": 2.6711409395973154, | |
| "grad_norm": 0.0006564030982639905, | |
| "learning_rate": 7.263208514547548e-07, | |
| "loss": 2.6694764528656378e-06, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 2.6711409395973154, | |
| "eval_loss": 2.682836338863126e-06, | |
| "eval_runtime": 2.0484, | |
| "eval_samples_per_second": 122.044, | |
| "eval_steps_per_second": 7.811, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 2.738255033557047, | |
| "grad_norm": 0.0006632458099436633, | |
| "learning_rate": 4.7585466641868696e-07, | |
| "loss": 2.6877429263549858e-06, | |
| "step": 205 | |
| }, | |
| { | |
| "epoch": 2.8053691275167782, | |
| "grad_norm": 0.0006591045490234142, | |
| "learning_rate": 2.7716224370188836e-07, | |
| "loss": 2.6864749088417738e-06, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 2.87248322147651, | |
| "grad_norm": 0.0006574142715557724, | |
| "learning_rate": 1.3132368591809553e-07, | |
| "loss": 2.678953023860231e-06, | |
| "step": 215 | |
| }, | |
| { | |
| "epoch": 2.9395973154362416, | |
| "grad_norm": 0.0006592814820222594, | |
| "learning_rate": 3.913177925055189e-08, | |
| "loss": 2.6803716536960563e-06, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "grad_norm": 0.0006633342417694629, | |
| "learning_rate": 1.0876838240125865e-09, | |
| "loss": 2.679282988538034e-06, | |
| "step": 225 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 2.67330960923573e-06, | |
| "eval_runtime": 2.091, | |
| "eval_samples_per_second": 119.56, | |
| "eval_steps_per_second": 7.652, | |
| "step": 225 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "step": 225, | |
| "total_flos": 4338410323968.0, | |
| "train_loss": 0.1150990028197177, | |
| "train_runtime": 1408.4559, | |
| "train_samples_per_second": 10.117, | |
| "train_steps_per_second": 0.16 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 225, | |
| "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": 4338410323968.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |