πŸ” Text-to-SQL with T5 (t5-base)

This model is a fine-tuned version of t5-base on a custom Text-to-SQL dataset. It translates natural language questions into corresponding SQL queries.

πŸ“Œ Model Details

  • Base model: t5-base
  • Task: Natural Language to SQL (text-to-SQL)
  • Dataset: Small custom dataset (~10–15 examples) of questions and SQL queries
  • Language: English
  • Fine-tuned by: Priyanshu05

🧠 Example

from transformers import T5Tokenizer, T5ForConditionalGeneration

model = T5ForConditionalGeneration.from_pretrained("Priyanshu05/text-to-sql-t5")
tokenizer = T5Tokenizer.from_pretrained("Priyanshu05/text-to-sql-t5")

question = "translate natural language to SQL: show all customers"
inputs = tokenizer(question, return_tensors="pt")
output = model.generate(**inputs)
print(tokenizer.decode(output[0], skip_special_tokens=True))

License

This project is licensed under the Apache-2.0 License.

Downloads last month
0
Safetensors
Model size
223M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support