Downloads · 30 days
12
1% of all-time downloads
frankmorales2020/Mistral-7B-text-to-sql
Mistral-7B-text-to-sql is a machine learning model from frankmorales2020. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
12
1% of all-time downloads
All-time downloads
807
Public
Repo size
5.6 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.9 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of mistralai/Mistral-7B-Instruct-v0.1 on the generator dataset. https://huggingface.co/datasets/b-mc2/sql-create-context
b-mc2/sql-create-context
import torch from peft import AutoPeftModelForCausalLM from transformers import AutoTokenizer, pipeline
peft_model_id = "frankmorales2020/Mistral-7B-text-to-sql"
model = AutoPeftModelForCausalLM.from_pretrained( peft_model_id, device_map="auto", torch_dtype=torch.float16 )
tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
https://huggingface.co/datasets/b-mc2/sql-create-context
https://medium.com/@frankmorales_91352/text-to-sql-generation-a-comprehensive-overview-6feb24f69f3c
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
When evaluated on 1000 samples from the evaluation dataset, our model achieved an impressive accuracy of 76.30%. However, there's room for improvement. We could enhance the model's performance by exploring techniques like few-shot learning, RAG, and Self-healing to generate the SQL query.