Edit model card

Model Card: HuggingFace Text2SQL Model (Fine-tuned BART)

Overview

  • Model Name: HuggingFace Text2SQL Model (Fine-tuned BART)
  • Model Version: 1.0
  • Model Objective: Text-to-SQL Translation
  • Accuracy on Train Dataset (Text-to-SQL): 50.4%
  • Accuracy on Dev Dataset (Text-to-SQL): 49.7%
  • SQL Accuracy on Dev Dataset: 51.1%

Model Description

The HuggingFace Text2SQL model is based on the BART architecture, fine-tuned for the specific task of translating natural language questions into SQL queries. BART (Bidirectional and Auto-Regressive Transformers) is a transformer-based model originally developed by Facebook AI for various natural language processing tasks, including text generation and summarization. This model was fine-tuned on the SPIDER dataset, which provides pairs of natural language questions and their corresponding SQL queries. Additionally, the model leverages databases for executing the generated SQL queries, enabling it to verify the correctness of the generated queries.

Intended Use

This model is intended for applications where there's a need to convert natural language queries into SQL for querying databases. It can be applied in various domains where structured data is accessible via SQL interfaces.

Limitations

  • Performance: While the model demonstrates moderate accuracy in translating natural language questions to SQL queries, the exact SQL accuracy on the development dataset should be provided for a comprehensive understanding of its performance.
  • Generalization: The model's ability to generalize to out-of-domain or noisy data may vary. Users should evaluate its performance on their specific datasets and tasks.
  • SQL Accuracy Metric: Detailed information about the SQL accuracy metric used for evaluation should be provided to understand the model's performance in generating accurate SQL queries.

Ethical Considerations

  • Bias: Bias in the model's translations, particularly concerning sensitive attributes such as race, gender, or ethnicity, should be carefully monitored and mitigated.
  • Privacy: Care should be taken to protect user privacy and data security when translating natural language queries into SQL, especially when sensitive information may be present in the queries or the underlying database.
  • Fairness: Fairness considerations should be taken into account to ensure equitable performance across different demographic groups.

Dataset

The model was fine-tuned on the SPIDER dataset, which consists of natural language questions paired with their corresponding SQL queries. The dataset was split into training and development sets for fine-tuning and evaluation.

Evaluation Metrics

The model's performance was primarily evaluated based on accuracy in translating natural language questions to SQL queries. Additionally, SQL accuracy on the development dataset was considered for a more comprehensive assessment of the model's performance.

Disclaimer

This model is provided as-is, without any warranties or guarantees of performance or suitability for any particular task or application. Users are encouraged to thoroughly evaluate the model's performance and suitability for their specific use case before deployment.

Downloads last month
78
Safetensors
Model size
139M params
Tensor type
F32
·

Dataset used to train Tigran555/text2sql