Downloads · 30 days
7
4% of all-time downloads
Omid-sar/fine-tuning-llama2-7b-code-generation-ludwig
fine-tuning-llama2-7b-code-generation-ludwig is a machine learning model from Omid-sar. 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 following bitsandbytes quantization config was used during training: - quantmethod: bitsandbytes - loadin8bit: False - loadin4bit: True - llmint8threshold: 6.0 - llmint8skipmodules: None - llmint8enablefp32cpuoffl…
Downloads · 30 days
7
4% of all-time downloads
All-time downloads
165
Public
Repo size
16.8 MB
Likes
0
Public
Click a slice to open those files.
.bin16.8 MB · 100%
From the Hugging Face model README
The following bitsandbytes quantization config was used during training:
The following bitsandbytes quantization config was used during training:
PEFT 0.5.0
PEFT 0.5.0
The goal of this project is to fine-tune the Llama2-7b language model for code generation using the QLORA method. The model will take natural language as input, and should return code as output. We're first going to iterate on a base Llama-2-7b model with prompting, and finally instruction-fine-tune the model.
As an example, if we prompt the model with this instruction:
Instruction: Create an array of length 5 which contains all even numbers between 1 and 10.
We want the model to produce exactly this response:
Response: array = [2, 4, 6, 8, 10]
The QLORA method for fine-tuning large language models (LLMs) is a parameter-efficient approach that uses 4-bit quantization to reduce the memory and computational requirements of fine-tuning. QLORA is implemented in the PEFT library, which is built on top of the Hugging Face Transformers library.
Ludwig requires data to be in a specific format. The main components of the data format are:
input_features: Defines the input features of the model. Each feature must have a name and type.output_features: Defines the output features of the model. Similar to input features, each output feature must have a name and type.Here is an example of a simple Ludwig config:
input_features:
- name: instruction
type: text
output_features:
- name: output
type: text
This config tells Ludwig to use the column called instruction in the dataset as an input feature and the output column as an output feature.
git clone https://github.com/omid-sar/Llama2-7B-Fine-Tuning--Google-Colab-.git
Fine_Tuning_Llama2_7b(_Ludwig).ipynb in Google Colab or a local Jupyter environment.pip install ludwig