--- library_name: peft tags: - trl - sft - generated_from_trainer - text-to-sql - Spider base_model: VictorDCh/Llama-3-8B-Instruct-MoE-2 datasets: - generator - Hexamind/spider-clean-text-to-sql model-index: - name: Llama-3-8B-Instruct-MoE-2-spider results: [] language: - en --- # Llama-3-8B-Instruct-MoE-2-spider This model is a fine-tuned version of [VictorDCh/Llama-3-8B-Instruct-MoE-2](https://huggingface.co/VictorDCh/Llama-3-8B-Instruct-MoE-2) on the generator dataset. ## Model description This is a mixture of experts merged with mergekit from 4 experts (Llama 3 8B Instruct), fine-tuned on the Spider train dataset. ## Intended uses & limitations This is part of a research project on using open-source models for text-to-SQL use cases. Some pre-processing of the input data, and post-processing of the results may be necessary to obtain optimal results. The input prompt uses the following system-user-assistant format: - system message: """You are a text to SQL query translator. Users will ask you questions in English and you will generate a SQL query based on the provided SCHEMA. Only generate SQL. SCHEMA: {schema}""" - user message: """Here is the user question in natural language: {question} """ - assistant message (empty when testing): {SQL query} ## Training and evaluation data The training and testing dataset can be found here: [Cleaned Spider dataset](https://huggingface.co/datasets/Hexamind/spider-clean-text-to-sql). ## Training procedure One epoch of SFT on the train dataset as explained above. ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 0.0002 - train_batch_size: 1 - eval_batch_size: 8 - seed: 42 - gradient_accumulation_steps: 2 - total_train_batch_size: 2 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: cosine - lr_scheduler_warmup_ratio: 0.03 - num_epochs: 1 ### Framework versions - PEFT 0.7.2.dev0 - Transformers 4.36.2 - Pytorch 2.1.2+cu121 - Datasets 2.16.1 - Tokenizers 0.15.2