/llm-sql-qlora-7B

Fine tune Mistral-7B (or other model <=7B e.g CodeLlama) for SQL generation on 24GB GPU

Primary LanguageJupyter Notebook

LLM QLoRA fine tune for Mistral-7B for SQL Generation

Use Hugging Face TRL library to train QLoRA adaptors on Mistral-7B.

Using sql-create-context dataset. Each row has a natural language instruction, a context that contains the schema of a DB and the answer as a SQL query. This is useful in lots of situations and the same approach can be applied to other DSLs or tools

Test on the evaulation set and give examples for running with inference servers