Text2SQL Fine-Tuning
We have split the Text2SQL-related fine-tuning code into the DB-GPT-Hub
sub-project, and you can also view the source code directly.
Fine-tune pipline
Text2SQL pipline mainly includes the following processes:
Build environment
We recommend using the conda virtual environment to build a Text2SQL fine-tuning environment
git clone https://github.com/eosphoros-ai/DB-GPT-Hub.git
cd DB-GPT-Hub
conda create -n dbgpt_hub python=3.10
conda activate dbgpt_hub
conda install -c conda-forge poetry>=1.4.0
poetry install
The current project supports multiple LLMs and can be downloaded on demand. In this tutorial, we use CodeLlama-13b-Instruct-hf
as the base model. The model can be downloaded from platforms such as HuggingFace and Modelscope. Taking HuggingFace as an example, the download command is:
cd Your_model_dir
git lfs install
git clone git@hf.co:codellama/CodeLlama-13b-Instruct-hf