Text Generation
Transformers
Safetensors
PEFT
English
phi
nl2sql
custom_code
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use pavankumarbalijepalli/phi2-nl2sql-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pavankumarbalijepalli/phi2-nl2sql-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pavankumarbalijepalli/phi2-nl2sql-lora", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pavankumarbalijepalli/phi2-nl2sql-lora", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("pavankumarbalijepalli/phi2-nl2sql-lora", trust_remote_code=True) - PEFT
How to use pavankumarbalijepalli/phi2-nl2sql-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pavankumarbalijepalli/phi2-nl2sql-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pavankumarbalijepalli/phi2-nl2sql-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pavankumarbalijepalli/phi2-nl2sql-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pavankumarbalijepalli/phi2-nl2sql-lora
- SGLang
How to use pavankumarbalijepalli/phi2-nl2sql-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 "pavankumarbalijepalli/phi2-nl2sql-lora" \ --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": "pavankumarbalijepalli/phi2-nl2sql-lora", "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 "pavankumarbalijepalli/phi2-nl2sql-lora" \ --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": "pavankumarbalijepalli/phi2-nl2sql-lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use pavankumarbalijepalli/phi2-nl2sql-lora with Docker Model Runner:
docker model run hf.co/pavankumarbalijepalli/phi2-nl2sql-lora
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
| 7 |
|
| 8 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
-
|
| 10 |
|
| 11 |
|
| 12 |
## Model Details
|
|
@@ -17,13 +27,13 @@ tags: []
|
|
| 17 |
|
| 18 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
|
| 20 |
-
- **Developed by:**
|
| 21 |
-
- **Funded by [optional]:**
|
| 22 |
-
- **Shared by [optional]:**
|
| 23 |
-
- **Model type:**
|
| 24 |
-
- **Language(s) (NLP):**
|
| 25 |
-
- **License:**
|
| 26 |
-
- **Finetuned from model [optional]:**
|
| 27 |
|
| 28 |
### Model Sources [optional]
|
| 29 |
|
|
@@ -196,6 +206,4 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 196 |
|
| 197 |
## Model Card Contact
|
| 198 |
|
| 199 |
-
[More Information Needed]
|
| 200 |
-
|
| 201 |
-
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- research
|
| 5 |
+
- lora
|
| 6 |
+
- nl2sql
|
| 7 |
+
- sql
|
| 8 |
+
license: mit
|
| 9 |
+
datasets:
|
| 10 |
+
- b-mc2/sql-create-context
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
---
|
| 15 |
|
| 16 |
# Model Card for Model ID
|
| 17 |
|
| 18 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 19 |
+
phi2-nl2sql is a finetuned model of phi-2. The dataset used is `b-mc2/sql-create-context`. This is a base model for the upcoming `gguf` version.
|
| 20 |
|
| 21 |
|
| 22 |
## Model Details
|
|
|
|
| 27 |
|
| 28 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 29 |
|
| 30 |
+
- **Developed by:** Pavan Kumar Balijepalli
|
| 31 |
+
- **Funded by [optional]:** Pavan Kumar Balijepalli
|
| 32 |
+
- **Shared by [optional]:** Pavan Kumar Balijepalli
|
| 33 |
+
- **Model type:** Casual_LM
|
| 34 |
+
- **Language(s) (NLP):** English, SQL
|
| 35 |
+
- **License:** MIT
|
| 36 |
+
- **Finetuned from model [optional]:** microsoft/phi-2
|
| 37 |
|
| 38 |
### Model Sources [optional]
|
| 39 |
|
|
|
|
| 206 |
|
| 207 |
## Model Card Contact
|
| 208 |
|
| 209 |
+
[More Information Needed]
|
|
|
|
|
|