Run this model with HF Jobs
Run sumanthmandavalli/phi3-sql-finetuned on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/sumanthmandavalli/phi3-sql-finetuned. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/sumanthmandavalli/phi3-sql-finetuned on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/sumanthmandavalli/phi3-sql-finetuned. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/sumanthmandavalli/phi3-sql-finetuned. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use sumanthmandavalli/phi3-sql-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sumanthmandavalli/phi3-sql-finetuned with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-3-mini-4k-instruct") model = PeftModel.from_pretrained(base_model, "sumanthmandavalli/phi3-sql-finetuned") - Transformers
How to use sumanthmandavalli/phi3-sql-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sumanthmandavalli/phi3-sql-finetuned") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sumanthmandavalli/phi3-sql-finetuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sumanthmandavalli/phi3-sql-finetuned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sumanthmandavalli/phi3-sql-finetuned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sumanthmandavalli/phi3-sql-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sumanthmandavalli/phi3-sql-finetuned
- SGLang
How to use sumanthmandavalli/phi3-sql-finetuned 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 "sumanthmandavalli/phi3-sql-finetuned" \ --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": "sumanthmandavalli/phi3-sql-finetuned", "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 "sumanthmandavalli/phi3-sql-finetuned" \ --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": "sumanthmandavalli/phi3-sql-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sumanthmandavalli/phi3-sql-finetuned with Docker Model Runner:
docker model run hf.co/sumanthmandavalli/phi3-sql-finetuned
sumanthmandavalli/phi3-sql-finetuned
Browse filesFiles changed (10)
- README.mdAdded+60
- adapter_config.jsonAdded+39
- adapter_model.safetensorsAdded+3
- added_tokens.jsonAdded+13
- chat_template.jinjaAdded+8
- special_tokens_map.jsonAdded+30
- tokenizer.jsonAdded
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded+131
- training_args.binAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960---library_name: peftlicense: mitbase_model: microsoft/Phi-3-mini-4k-instructtags:- base_model:adapter:microsoft/Phi-3-mini-4k-instruct- lora- transformerspipeline_tag: text-generationmodel-index:- name: phi3-sql-finetuned results: []---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# phi3-sql-finetuned
This model is a fine-tuned version of [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) on an unknown dataset.
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 0.0002- train_batch_size: 2- eval_batch_size: 2- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 8- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments- lr_scheduler_type: linear- num_epochs: 3- mixed_precision_training: Native AMP
### Training results
### Framework versions
- PEFT 0.17.1- Transformers 4.56.1- Pytorch 2.8.0+cu126- Datasets 4.0.0- Tokenizers 0.22.0123456789101112131415161718192021222324252627282930313233343536373839{ "alpha_pattern": {}, "auto_mapping": null, "base_model_name_or_path": "microsoft/Phi-3-mini-4k-instruct", "bias": "none", "corda_config": null, "eva_config": null, "exclude_modules": null, "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layer_replication": null, "layers_pattern": null, "layers_to_transform": null, "loftq_config": {}, "lora_alpha": 32, "lora_bias": false, "lora_dropout": 0.05, "megatron_config": null, "megatron_core": "megatron.core", "modules_to_save": null, "peft_type": "LORA", "qalora_group_size": 16, "r": 16, "rank_pattern": {}, "revision": null, "target_modules": [ "qkv_proj", "gate_up_proj", "o_proj", "down_proj" ], "target_parameters": null, "task_type": "CAUSAL_LM", "trainable_token_indices": null, "use_dora": false, "use_qalora": false, "use_rslora": false}123version https://git-lfs.github.com/spec/v1oid sha256:a0859d2652913e904e007dc3b4491c8a75563862f75947136ce9872f4c4787d4size 10069772812345678910111213{ "<|assistant|>": 32001, "<|endoftext|>": 32000, "<|end|>": 32007, "<|placeholder1|>": 32002, "<|placeholder2|>": 32003, "<|placeholder3|>": 32004, "<|placeholder4|>": 32005, "<|placeholder5|>": 32008, "<|placeholder6|>": 32009, "<|system|>": 32006, "<|user|>": 32010}12345678{% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>' + message['content'] + '<|end|>'}}{% elif message['role'] == 'user' %}{{'<|user|>' + message['content'] + '<|end|>'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>' + message['content'] + '<|end|>'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %}123456789101112131415161718192021222324252627282930{ "bos_token": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347size 499723123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131{ "add_bos_token": false, "add_eos_token": false, "add_prefix_space": null, "added_tokens_decoder": { "0": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": false }, "32000": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32001": { "content": "<|assistant|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32002": { "content": "<|placeholder1|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32003": { "content": "<|placeholder2|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32004": { "content": "<|placeholder3|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32005": { "content": "<|placeholder4|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32006": { "content": "<|system|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32007": { "content": "<|end|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32008": { "content": "<|placeholder5|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32009": { "content": "<|placeholder6|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true }, "32010": { "content": "<|user|>", "lstrip": false, "normalized": false, "rstrip": true, "single_word": false, "special": true } }, "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "<|endoftext|>", "extra_special_tokens": {}, "legacy": false, "model_max_length": 4096, "pad_token": "<|endoftext|>", "padding_side": "left", "sp_model_kwargs": {}, "tokenizer_class": "LlamaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": false}123version https://git-lfs.github.com/spec/v1oid sha256:2fe013179685c8baa739b552be8effcc3a0fe066966c9c5ce9f672bc9fad680csize 5713README.mdAdded+60
adapter_config.jsonAdded+39
adapter_model.safetensorsAdded+3
added_tokens.jsonAdded+13
chat_template.jinjaAdded+8
special_tokens_map.jsonAdded+30
tokenizer.jsonAdded
tokenizer.modelAdded+3
tokenizer_config.jsonAdded+131
training_args.binAdded+3