Instructions to use dangkhoa241/nl2sql-intent-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dangkhoa241/nl2sql-intent-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dangkhoa241/nl2sql-intent-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("dangkhoa241/nl2sql-intent-model") model = AutoModelForSequenceClassification.from_pretrained("dangkhoa241/nl2sql-intent-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
NL→SQL intent classifier
Fine-tuned bert-base-uncased that labels a natural-language data question with the kind of SQL it needs:
aggregate, compare, count, filter, trend. It routes questions in the
RAG-assisted natural-language-to-SQL system
and picks the chart type.
- Training data: 1,000 of the 2,000 domain-neutral questions in the repo's
data/intent_dataset.csv(400 per intent, 14 domains); the other 1,000 are the validation split. - Validation accuracy: 100.0%. That split is templated like the training data, so it says little; on 150 hand-written hard questions the model scores 84.7%, and 75% on questions from an unseen SaaS domain (see the repo's README).
from transformers import pipeline
clf = pipeline("text-classification", model="dangkhoa241/nl2sql-intent-model")
clf("average billing amount by insurance provider")
- Downloads last month
- 21
Model tree for dangkhoa241/nl2sql-intent-model
Base model
google-bert/bert-base-uncased