YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Text-to-SQL Fine-tuned Model: DeepSeek-Coder-1.3B

This model was fine-tuned on the Gretel synthetic text-to-SQL dataset to generate SQL queries from natural language questions.

Model Details

  • Base model: DeepSeek-Coder-1.3B

Usage Example

from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("sankhlatarun/text-to-sql-deepseek-coder-1.3b")
tokenizer = AutoTokenizer.from_pretrained("sankhlatarun/text-to-sql-deepseek-coder-1.3b")
# Example schema and question
schema = """CREATE TABLE employees (
    id INTEGER PRIMARY KEY,
    name TEXT,
    department TEXT,
    salary INTEGER,
    hire_date DATE
)"""
question = "Show me the names of employees in the sales department with a salary greater than 50000."
# Format the prompt
prompt = f"""### Schema:
schema
### Question:
question
### SQL:
"""
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256)
generated_sql = tokenizer.decode(outputs[0], skip_special_tokens=True)[len(prompt):]
print(generated_sql)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.