File size: 2,753 Bytes
4bd7c77
 
 
 
 
 
 
 
 
 
 
f69936b
4bd7c77
 
 
 
 
 
b8962d6
4bd7c77
 
 
 
 
 
 
f75ffe0
 
4bd7c77
 
 
f75ffe0
 
 
 
 
4bd7c77
 
 
f75ffe0
 
 
 
 
 
 
4bd7c77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
base_model: mistralai/Mistral-7B-Instruct-v0.3
datasets:
- generator
library_name: peft
license: apache-2.0
tags:
- trl
- sft
- generated_from_trainer
model-index:
- name: Mistral-7B-Text2SQL
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# Mistral-7B-Text2SQL

This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) on the generator dataset.
It achieves the following results on the evaluation set:
- Loss: 0.4643

## Model description

This repository contains a fine-tuned version of the Mistral 7B model, tailored specifically for text-to-SQL tasks.
The model is designed to convert natural language queries into structured SQL queries, enabling seamless interaction with databases through conversational language.

## Intended uses & limitations

The Mistral-7B-Text2SQL model is intended for applications that require converting natural language queries into SQL commands. Suitable use cases include:

Conversational Agents: Allowing users to retrieve information from databases through natural language interaction.
Data Analytics: Enabling non-technical users to query databases without needing to know SQL syntax.
Business Intelligence: Supporting decision-making processes by simplifying data access.

## Training and evaluation data

The model was fine-tuned using the generator dataset, which consists of a variety of natural language queries paired with corresponding SQL commands. The dataset is designed to cover a wide range of query types, allowing the model to generalize better across different types of SQL queries.

Dataset Characteristics
Diversity: The dataset includes examples from various domains, ensuring that the model learns to handle a broad spectrum of queries.
Size: (Include the size of the dataset, e.g., the number of examples if available.)
Annotations: Each example includes natural language input along with the expected SQL output, facilitating supervised learning.



### Training results

| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:-----:|:----:|:---------------:|
| 1.8346        | 0.4   | 10   | 0.7031          |
| 0.5882        | 0.8   | 20   | 0.5273          |
| 0.487         | 1.2   | 30   | 0.4850          |
| 0.4423        | 1.6   | 40   | 0.4675          |
| 0.4235        | 2.0   | 50   | 0.4564          |
| 0.3464        | 2.4   | 60   | 0.4690          |
| 0.3411        | 2.8   | 70   | 0.4643          |


### Framework versions

- PEFT 0.13.2
- Transformers 4.45.2
- Pytorch 2.4.1+cu121
- Datasets 3.0.1
- Tokenizers 0.20.1