Instructions to use EricWesthoff/phi-1_5-finetuned-SQL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EricWesthoff/phi-1_5-finetuned-SQL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EricWesthoff/phi-1_5-finetuned-SQL", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("EricWesthoff/phi-1_5-finetuned-SQL", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EricWesthoff/phi-1_5-finetuned-SQL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EricWesthoff/phi-1_5-finetuned-SQL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EricWesthoff/phi-1_5-finetuned-SQL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EricWesthoff/phi-1_5-finetuned-SQL
- SGLang
How to use EricWesthoff/phi-1_5-finetuned-SQL 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 "EricWesthoff/phi-1_5-finetuned-SQL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EricWesthoff/phi-1_5-finetuned-SQL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "EricWesthoff/phi-1_5-finetuned-SQL" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EricWesthoff/phi-1_5-finetuned-SQL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EricWesthoff/phi-1_5-finetuned-SQL with Docker Model Runner:
docker model run hf.co/EricWesthoff/phi-1_5-finetuned-SQL
Commit ·
15bc873
1
Parent(s): 332ed3a
End of training
Browse files
README.md
CHANGED
|
@@ -14,6 +14,8 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 14 |
# phi-1_5-finetuned-SQL
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [microsoft/phi-1_5](https://huggingface.co/microsoft/phi-1_5) on the None dataset.
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
@@ -40,6 +42,17 @@ The following hyperparameters were used during training:
|
|
| 40 |
- lr_scheduler_type: cosine
|
| 41 |
- num_epochs: 5
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
### Framework versions
|
| 44 |
|
| 45 |
- Transformers 4.34.1
|
|
|
|
| 14 |
# phi-1_5-finetuned-SQL
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [microsoft/phi-1_5](https://huggingface.co/microsoft/phi-1_5) on the None dataset.
|
| 17 |
+
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 1.1600
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
|
|
| 42 |
- lr_scheduler_type: cosine
|
| 43 |
- num_epochs: 5
|
| 44 |
|
| 45 |
+
### Training results
|
| 46 |
+
|
| 47 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 48 |
+
|:-------------:|:-----:|:-----:|:---------------:|
|
| 49 |
+
| 1.5428 | 1.0 | 12364 | 1.4610 |
|
| 50 |
+
| 1.4145 | 2.0 | 24728 | 1.3385 |
|
| 51 |
+
| 1.3136 | 3.0 | 37092 | 1.2388 |
|
| 52 |
+
| 1.2444 | 4.0 | 49456 | 1.1757 |
|
| 53 |
+
| 1.1791 | 5.0 | 61820 | 1.1600 |
|
| 54 |
+
|
| 55 |
+
|
| 56 |
### Framework versions
|
| 57 |
|
| 58 |
- Transformers 4.34.1
|