Edit model card

Update notice

The model weights were updated at 8 AM UTC on Sep 12, 2024.

Model Card for DR-TEXT2SQL-CodeLlama2-7B-Chinese-240913

A capable large language model for natural language to SQL generation.

Language

Chinese

Model Details

Model Description

This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.

Developed by: eglym Model type: [Text to SQL] License: [CC-by-SA-4.0] Finetuned from model: [CodeLlama-7B]

Uses This model is intended to be used by non-technical users to understand data inside their SQL databases. It is meant as an analytics tool, and not as a database admin tool.

This model has not been trained to reject malicious requests from users with write access to databases, and should only be used by users with read-only access.

How to Get Started with the Model Use the code here to get started with the model.

Prompt Please use the following prompt for optimal results. Please remember to use do_sample=False and num_beams=4 for optimal results.

Task

Generate a SQL query to answer user_question.

Answer

Given the database schema, here is the SQL query that realize user_question.

Evaluation This model was evaluated on SQL-Eval, a PostgreSQL based evaluation framework developed by Defog for testing and alignment of model capabilities.

You can read more about the methodology behind SQLEval here.

Results We classified each generated question into one of 6 categories. The table displays the percentage of questions answered correctly by each model, broken down by category.

            easy        medium        hard        extra        all                 
count       250         440           174         170          1034                
compare etype exec
=====================   EXECUTION ACCURACY     =====================
execution   0.756       0.602         0.477       0.265        0.563   
Downloads last month
10
Safetensors
Model size
6.74B params
Tensor type
FP16
·
Inference API
Unable to determine this model's library. Check the docs .

Model tree for eglym/DR-TEXT2SQL-CodeLlama2-7B-Chinese-240913

Finetuned
(35)
this model