How to use from
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?"
			}
		]
	}'
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
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for dattheshshenoy/sqlifyai-30min-test

Finetuned
(87)
this model