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")# pip install -U transformers accelerate # 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
Commit History
-
Update README.md
Verified signature5df76ad -
Update README.md
Verified signaturebae4479 -
Update README.md
Verified signatureModel Card: HuggingFace Text2SQL Model (Fine-tuned BART) ### Overview - **Model Name**: HuggingFace Text2SQL Model (Fine-tuned BART) - **Model Version**: 1.0 - **Model Objective**: Text-to-SQL Translation - **Accuracy on Train Dataset (Text-to-SQL)**: 50.4% - **Accuracy on Dev Dataset (Text-to-SQL)**: 49.7% - **SQL Accuracy on Dev Dataset**: 51.1% ### Model Description The HuggingFace Text2SQL model is based on the BART architecture, fine-tuned for the specific task of translating natural language questions into SQL queries. BART (Bidirectional and Auto-Regressive Transformers) is a transformer-based model originally developed by Facebook AI for various natural language processing tasks, including text generation and summarization. This model was fine-tuned on the SPIDER dataset, which provides pairs of natural language questions and their corresponding SQL queries. Additionally, the model leverages databases for executing the generated SQL queries, enabling it to verify the correctn…51ac59d -
Update README.md
Verified signatureModel Card: HuggingFace Text2SQL Model (Fine-tuned BART) ### Overview - **Model Name**: HuggingFace Text2SQL Model (Fine-tuned BART) - **Model Version**: 1.0 - **Model Objective**: Text-to-SQL Translation - **Accuracy on Train Dataset (Text-to-SQL)**: 50.4% - **Accuracy on Dev Dataset (Text-to-SQL)**: 49.7% - **SQL Accuracy on Dev Dataset**: 51.1% ### Model Description The HuggingFace Text2SQL model is based on the BART architecture, fine-tuned for the specific task of translating natural language questions into SQL queries. BART (Bidirectional and Auto-Regressive Transformers) is a transformer-based model originally developed by Facebook AI for various natural language processing tasks, including text generation and summarization. This model was fine-tuned on the SPIDER dataset, which provides pairs of natural language questions and their corresponding SQL queries. Additionally, the model leverages databases for executing the generated SQL queries, enabling it to verify the correctn…e82dec5 -
Upload tokenizer
Verified signature5557a82 -
Upload BartForConditionalGeneration
Verified signature6d935fa -
Upload tokenizer
Verified signatureaff82a5 -
Upload tokenizer
Verified signaturefb87243 -
Upload BartForConditionalGeneration
Verified signatured3db9d9
-
initial commit
Verified signaturee5abbc1