Text Generation
Transformers
Safetensors
text-to-sql
spider-dataset
sqlifyai
code-generation
conversational
Instructions to use dattheshshenoy/sqlifyai-30min-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dattheshshenoy/sqlifyai-30min-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dattheshshenoy/sqlifyai-30min-test") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dattheshshenoy/sqlifyai-30min-test", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dattheshshenoy/sqlifyai-30min-test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dattheshshenoy/sqlifyai-30min-test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dattheshshenoy/sqlifyai-30min-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dattheshshenoy/sqlifyai-30min-test
- SGLang
How to use dattheshshenoy/sqlifyai-30min-test 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 "dattheshshenoy/sqlifyai-30min-test" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dattheshshenoy/sqlifyai-30min-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "dattheshshenoy/sqlifyai-30min-test" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dattheshshenoy/sqlifyai-30min-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dattheshshenoy/sqlifyai-30min-test with Docker Model Runner:
docker model run hf.co/dattheshshenoy/sqlifyai-30min-test
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("dattheshshenoy/sqlifyai-30min-test", dtype="auto")Quick Links
SQLifyAI - Text-to-SQL Model
This model was fine-tuned using SQLifyAI on the Spider dataset for converting natural language questions to SQL queries.
Model Details
- Base Model: codellama/CodeLlama-7b-Instruct-hf
- Dataset: Spider
- Training: Multi-stage curriculum learning with advanced schema linking
- Commit: 30-minute rapid test training run
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("dattheshshenoy/sqlifyai-30min-test")
model = AutoModelForCausalLM.from_pretrained("dattheshshenoy/sqlifyai-30min-test")
# Generate SQL
question = "What are the names of all students?"
schema = "CREATE TABLE students (id INT, name VARCHAR(50));"
prompt = f"### Question: {question}\n### Schema: {schema}\n### SQL:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=128)
sql = tokenizer.decode(outputs[0], skip_special_tokens=True).split("### SQL:")[-1].strip()
Performance
- Trained with advanced schema linking and curriculum learning
- Optimized for Spider dataset evaluation metrics
Model tree for dattheshshenoy/sqlifyai-30min-test
Base model
codellama/CodeLlama-7b-Instruct-hf
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dattheshshenoy/sqlifyai-30min-test") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)