Instructions to use TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-14B-Instruct") model = PeftModel.from_pretrained(base_model, "TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora") - Transformers
How to use TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora
- SGLang
How to use TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora 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 "TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora" \ --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": "TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora", "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 "TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora" \ --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": "TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora with Docker Model Runner:
docker model run hf.co/TicklingShell/qwen2.5-coder-14b-text2sql-sft-lora
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 313, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 0.09649655148386956, | |
| "epoch": 0.032, | |
| "grad_norm": 0.2255859375, | |
| "learning_rate": 0.00018, | |
| "loss": 0.14522699117660523, | |
| "mean_token_accuracy": 0.9369595624506474, | |
| "num_tokens": 66476.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 0.08880856377654708, | |
| "epoch": 0.064, | |
| "grad_norm": 0.173828125, | |
| "learning_rate": 0.0001995649347969019, | |
| "loss": 0.08154842257499695, | |
| "mean_token_accuracy": 0.9461333908140659, | |
| "num_tokens": 140569.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 0.08434813401545398, | |
| "epoch": 0.096, | |
| "grad_norm": 0.169921875, | |
| "learning_rate": 0.0001980658652386421, | |
| "loss": 0.08437747955322265, | |
| "mean_token_accuracy": 0.9686024446040392, | |
| "num_tokens": 204086.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 0.0869230936281383, | |
| "epoch": 0.128, | |
| "grad_norm": 0.1357421875, | |
| "learning_rate": 0.0001955135170885202, | |
| "loss": 0.07795352935791015, | |
| "mean_token_accuracy": 0.9808623071759939, | |
| "num_tokens": 271252.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 0.07329072935972362, | |
| "epoch": 0.16, | |
| "grad_norm": 0.19140625, | |
| "learning_rate": 0.00019193530389822363, | |
| "loss": 0.08132061958312989, | |
| "mean_token_accuracy": 0.9672858133912087, | |
| "num_tokens": 337656.0, | |
| "step": 50 | |
| }, | |
| { | |
| "entropy": 0.0891664584632963, | |
| "epoch": 0.192, | |
| "grad_norm": 0.17578125, | |
| "learning_rate": 0.00018736965754556528, | |
| "loss": 0.09287956953048707, | |
| "mean_token_accuracy": 0.9650922071188688, | |
| "num_tokens": 410305.0, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 0.07671013890067116, | |
| "epoch": 0.224, | |
| "grad_norm": 0.203125, | |
| "learning_rate": 0.00018186561545605054, | |
| "loss": 0.07794617414474488, | |
| "mean_token_accuracy": 0.9760642010718584, | |
| "num_tokens": 477217.0, | |
| "step": 70 | |
| }, | |
| { | |
| "entropy": 0.0767284018744249, | |
| "epoch": 0.256, | |
| "grad_norm": 0.123046875, | |
| "learning_rate": 0.00017548229391532572, | |
| "loss": 0.08190351128578185, | |
| "mean_token_accuracy": 0.9707993991672993, | |
| "num_tokens": 549230.0, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 0.0770263057667762, | |
| "epoch": 0.288, | |
| "grad_norm": 0.171875, | |
| "learning_rate": 0.00016828825312940592, | |
| "loss": 0.06415510773658753, | |
| "mean_token_accuracy": 0.9708753030747175, | |
| "num_tokens": 616669.0, | |
| "step": 90 | |
| }, | |
| { | |
| "entropy": 0.06914123268215917, | |
| "epoch": 0.32, | |
| "grad_norm": 0.13671875, | |
| "learning_rate": 0.00016036076085226814, | |
| "loss": 0.07777998447418213, | |
| "mean_token_accuracy": 0.9653518848121166, | |
| "num_tokens": 686556.0, | |
| "step": 100 | |
| }, | |
| { | |
| "entropy": 0.06991175076691433, | |
| "epoch": 0.352, | |
| "grad_norm": 0.166015625, | |
| "learning_rate": 0.00015178496248983254, | |
| "loss": 0.07323018312454224, | |
| "mean_token_accuracy": 0.9576951999217271, | |
| "num_tokens": 759521.0, | |
| "step": 110 | |
| }, | |
| { | |
| "entropy": 0.09207692868367304, | |
| "epoch": 0.384, | |
| "grad_norm": 0.21484375, | |
| "learning_rate": 0.00014265296659384956, | |
| "loss": 0.09533499479293824, | |
| "mean_token_accuracy": 0.9764811851084232, | |
| "num_tokens": 826869.0, | |
| "step": 120 | |
| }, | |
| { | |
| "entropy": 0.08726739198318682, | |
| "epoch": 0.416, | |
| "grad_norm": 0.1904296875, | |
| "learning_rate": 0.00013306285556796495, | |
| "loss": 0.08955158591270447, | |
| "mean_token_accuracy": 0.956151831895113, | |
| "num_tokens": 898111.0, | |
| "step": 130 | |
| }, | |
| { | |
| "entropy": 0.06639394556113984, | |
| "epoch": 0.448, | |
| "grad_norm": 0.1533203125, | |
| "learning_rate": 0.000123117632211497, | |
| "loss": 0.06314496397972107, | |
| "mean_token_accuracy": 0.9615629483014345, | |
| "num_tokens": 969339.0, | |
| "step": 140 | |
| }, | |
| { | |
| "entropy": 0.0558678554254584, | |
| "epoch": 0.48, | |
| "grad_norm": 0.291015625, | |
| "learning_rate": 0.0001129241134155949, | |
| "loss": 0.06386124491691589, | |
| "mean_token_accuracy": 0.9733367815613747, | |
| "num_tokens": 1036672.0, | |
| "step": 150 | |
| }, | |
| { | |
| "entropy": 0.060232574946712705, | |
| "epoch": 0.512, | |
| "grad_norm": 0.1455078125, | |
| "learning_rate": 0.00010259178289406011, | |
| "loss": 0.06906680464744568, | |
| "mean_token_accuracy": 0.9617645684629679, | |
| "num_tokens": 1108529.0, | |
| "step": 160 | |
| }, | |
| { | |
| "entropy": 0.06748775953310542, | |
| "epoch": 0.544, | |
| "grad_norm": 0.14453125, | |
| "learning_rate": 9.223161527109937e-05, | |
| "loss": 0.06768612861633301, | |
| "mean_token_accuracy": 0.9634172908961773, | |
| "num_tokens": 1184675.0, | |
| "step": 170 | |
| }, | |
| { | |
| "entropy": 0.06814730220357887, | |
| "epoch": 0.576, | |
| "grad_norm": 0.185546875, | |
| "learning_rate": 8.195488415592238e-05, | |
| "loss": 0.06328855752944947, | |
| "mean_token_accuracy": 0.9700407199561596, | |
| "num_tokens": 1256207.0, | |
| "step": 180 | |
| }, | |
| { | |
| "entropy": 0.07081062349316199, | |
| "epoch": 0.608, | |
| "grad_norm": 0.55859375, | |
| "learning_rate": 7.187196700608373e-05, | |
| "loss": 0.06718837618827819, | |
| "mean_token_accuracy": 0.9618636917322874, | |
| "num_tokens": 1328169.0, | |
| "step": 190 | |
| }, | |
| { | |
| "entropy": 0.06150082344538532, | |
| "epoch": 0.64, | |
| "grad_norm": 0.1044921875, | |
| "learning_rate": 6.209115961596208e-05, | |
| "loss": 0.05759283900260925, | |
| "mean_token_accuracy": 0.9679569214582443, | |
| "num_tokens": 1399956.0, | |
| "step": 200 | |
| }, | |
| { | |
| "entropy": 0.06286092348891544, | |
| "epoch": 0.672, | |
| "grad_norm": 0.197265625, | |
| "learning_rate": 5.271751296338823e-05, | |
| "loss": 0.06326322555541992, | |
| "mean_token_accuracy": 0.9615916445851326, | |
| "num_tokens": 1475214.0, | |
| "step": 210 | |
| }, | |
| { | |
| "entropy": 0.0519205622273148, | |
| "epoch": 0.704, | |
| "grad_norm": 0.169921875, | |
| "learning_rate": 4.385170490729712e-05, | |
| "loss": 0.05610005855560303, | |
| "mean_token_accuracy": 0.972290551662445, | |
| "num_tokens": 1546118.0, | |
| "step": 220 | |
| }, | |
| { | |
| "entropy": 0.058427285050856884, | |
| "epoch": 0.736, | |
| "grad_norm": 0.224609375, | |
| "learning_rate": 3.558895885496023e-05, | |
| "loss": 0.05968340039253235, | |
| "mean_token_accuracy": 0.9686542131006718, | |
| "num_tokens": 1620482.0, | |
| "step": 230 | |
| }, | |
| { | |
| "entropy": 0.06077302123012487, | |
| "epoch": 0.768, | |
| "grad_norm": 0.115234375, | |
| "learning_rate": 2.8018021012875994e-05, | |
| "loss": 0.05487210750579834, | |
| "mean_token_accuracy": 0.9765994187444449, | |
| "num_tokens": 1686508.0, | |
| "step": 240 | |
| }, | |
| { | |
| "entropy": 0.05762897890235763, | |
| "epoch": 0.8, | |
| "grad_norm": 0.1455078125, | |
| "learning_rate": 2.1220207206178688e-05, | |
| "loss": 0.06742877364158631, | |
| "mean_token_accuracy": 0.9620399903506041, | |
| "num_tokens": 1764710.0, | |
| "step": 250 | |
| }, | |
| { | |
| "entropy": 0.059268097168387615, | |
| "epoch": 0.832, | |
| "grad_norm": 0.2041015625, | |
| "learning_rate": 1.526852950422226e-05, | |
| "loss": 0.058321452140808104, | |
| "mean_token_accuracy": 0.9726373586803675, | |
| "num_tokens": 1832644.0, | |
| "step": 260 | |
| }, | |
| { | |
| "entropy": 0.05387882571376394, | |
| "epoch": 0.864, | |
| "grad_norm": 0.1796875, | |
| "learning_rate": 1.0226912032836611e-05, | |
| "loss": 0.04902423620223999, | |
| "mean_token_accuracy": 0.9753172263503075, | |
| "num_tokens": 1901629.0, | |
| "step": 270 | |
| }, | |
| { | |
| "entropy": 0.05652731657464756, | |
| "epoch": 0.896, | |
| "grad_norm": 0.322265625, | |
| "learning_rate": 6.149504395842087e-06, | |
| "loss": 0.0603355348110199, | |
| "mean_token_accuracy": 0.9647678934037686, | |
| "num_tokens": 1975257.0, | |
| "step": 280 | |
| }, | |
| { | |
| "entropy": 0.05044347028888296, | |
| "epoch": 0.928, | |
| "grad_norm": 0.1484375, | |
| "learning_rate": 3.0801000800333877e-06, | |
| "loss": 0.04434172809123993, | |
| "mean_token_accuracy": 0.970330499112606, | |
| "num_tokens": 2042770.0, | |
| "step": 290 | |
| }, | |
| { | |
| "entropy": 0.05634855758107733, | |
| "epoch": 0.96, | |
| "grad_norm": 0.123046875, | |
| "learning_rate": 1.0516660902673448e-06, | |
| "loss": 0.053922271728515624, | |
| "mean_token_accuracy": 0.9622644379734993, | |
| "num_tokens": 2111795.0, | |
| "step": 300 | |
| }, | |
| { | |
| "entropy": 0.06218618047278142, | |
| "epoch": 0.992, | |
| "grad_norm": 0.1806640625, | |
| "learning_rate": 8.598886661895788e-08, | |
| "loss": 0.06558623909950256, | |
| "mean_token_accuracy": 0.9811610858887434, | |
| "num_tokens": 2182727.0, | |
| "step": 310 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_entropy": 0.10073611672315747, | |
| "eval_loss": 0.283896803855896, | |
| "eval_mean_token_accuracy": 0.931689467549324, | |
| "eval_num_tokens": 2202446.0, | |
| "eval_runtime": 135.118, | |
| "eval_samples_per_second": 3.7, | |
| "eval_steps_per_second": 3.7, | |
| "step": 313 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 313, | |
| "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": 1.867113674568868e+17, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |