peft region:us
---
library_name: peft
---
# CodeLlama-7b-Test-Instruct-lora

## Description

This repo contains a low-rank adapter for [CodeLlama-7b-Instruct](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) fit on the [zzzghttt/code2test](https://huggingface.co/datasets/zzzghttt/code2test) dataset.
The Lora model is primarily aimed at generating high-quality unit tests in Java.

### How to use

See [ChatUniTest Models](https://github.com/ZJU-ACES-ISE/chatunitest-models)

## Training data

[zzzghttt/code2test](https://huggingface.co/datasets/zzzghttt/code2test)

## Training procedure

This version of the weights was trained with the following hyperparameters:
- batch_size: 128
- micro_batch_size: 4
- num_epochs: 3 (load from best epoch)
- learning_rate: 3e-4
- cutoff_len: 2048
- lora_r: 64
- lora_alpha: 16
- lora_dropout: 0.05
- lora_target_modules: ['q_proj', 'v_proj']

The following `bitsandbytes` quantization config was used during training:
- quant_method: bitsandbytes
- load_in_8bit: True
- load_in_4bit: False
- llm_int8_threshold: 6.0
- llm_int8_skip_modules: None
- llm_int8_enable_fp32_cpu_offload: False
- llm_int8_has_fp16_weight: False
- bnb_4bit_quant_type: fp4
- bnb_4bit_use_double_quant: False
- bnb_4bit_compute_dtype: float32
### Framework versions


- PEFT 0.5.0
