Instructions to use rsher60/Llama3.2-text2sql with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rsher60/Llama3.2-text2sql with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rsher60/Llama3.2-text2sql")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rsher60/Llama3.2-text2sql", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rsher60/Llama3.2-text2sql with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rsher60/Llama3.2-text2sql" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rsher60/Llama3.2-text2sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/rsher60/Llama3.2-text2sql
- SGLang
How to use rsher60/Llama3.2-text2sql 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 "rsher60/Llama3.2-text2sql" \ --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": "rsher60/Llama3.2-text2sql", "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 "rsher60/Llama3.2-text2sql" \ --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": "rsher60/Llama3.2-text2sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use rsher60/Llama3.2-text2sql with Docker Model Runner:
docker model run hf.co/rsher60/Llama3.2-text2sql
Update README.md
Browse files
README.md
CHANGED
|
@@ -29,10 +29,8 @@ pipeline_tag: text-generation
|
|
| 29 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 30 |
|
| 31 |
- **Developed by:** Riddhiman Sherlekar
|
| 32 |
-
- **Model type:**
|
| 33 |
-
- **Language(s) (NLP):**
|
| 34 |
-
- **License:** [More Information Needed]
|
| 35 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 36 |
|
| 37 |
### Model Sources [optional]
|
| 38 |
|
|
@@ -45,7 +43,7 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
| 45 |
## Uses
|
| 46 |
|
| 47 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 48 |
-
|
| 49 |
### Direct Use
|
| 50 |
|
| 51 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
|
|
|
| 29 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 30 |
|
| 31 |
- **Developed by:** Riddhiman Sherlekar
|
| 32 |
+
- **Model type:** Text-Generation
|
| 33 |
+
- **Language(s) (NLP):** English
|
|
|
|
|
|
|
| 34 |
|
| 35 |
### Model Sources [optional]
|
| 36 |
|
|
|
|
| 43 |
## Uses
|
| 44 |
|
| 45 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 46 |
+
This model has been fine-tuned on a Text2SQL dataset focusing on five core SQL operation types: single joins, aggregation functions, basic SQL operations, window functions, and subqueries. The model is specifically designed to convert natural language queries into executable SQL code.
|
| 47 |
### Direct Use
|
| 48 |
|
| 49 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|