Instructions to use Tigran555/text2sql with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tigran555/text2sql with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tigran555/text2sql")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Tigran555/text2sql") model = AutoModelForSeq2SeqLM.from_pretrained("Tigran555/text2sql", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Tigran555/text2sql with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tigran555/text2sql" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tigran555/text2sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Tigran555/text2sql
- SGLang
How to use Tigran555/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 "Tigran555/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": "Tigran555/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 "Tigran555/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": "Tigran555/text2sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Tigran555/text2sql with Docker Model Runner:
docker model run hf.co/Tigran555/text2sql
Update README.md
Browse files
README.md
CHANGED
|
@@ -47,10 +47,5 @@ The model was fine-tuned on the SPIDER dataset, which consists of natural langua
|
|
| 47 |
### Evaluation Metrics
|
| 48 |
The model's performance was primarily evaluated based on accuracy in translating natural language questions to SQL queries. Additionally, SQL accuracy on the development dataset was considered for a more comprehensive assessment of the model's performance.
|
| 49 |
|
| 50 |
-
### Citation
|
| 51 |
-
If you use or reference this model in your work, please cite the following:
|
| 52 |
-
|
| 53 |
-
[Reference to the original BART model, SPIDER dataset, and any additional sources relevant to the fine-tuning process]
|
| 54 |
-
|
| 55 |
### Disclaimer
|
| 56 |
This model is provided as-is, without any warranties or guarantees of performance or suitability for any particular task or application. Users are encouraged to thoroughly evaluate the model's performance and suitability for their specific use case before deployment.
|
|
|
|
| 47 |
### Evaluation Metrics
|
| 48 |
The model's performance was primarily evaluated based on accuracy in translating natural language questions to SQL queries. Additionally, SQL accuracy on the development dataset was considered for a more comprehensive assessment of the model's performance.
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
### Disclaimer
|
| 51 |
This model is provided as-is, without any warranties or guarantees of performance or suitability for any particular task or application. Users are encouraged to thoroughly evaluate the model's performance and suitability for their specific use case before deployment.
|