File size: 1,067 Bytes
1e39f64
cd7db8d
4922acf
 
cd7db8d
 
 
 
 
1e39f64
4658d25
13c145a
 
 
02bc9f2
 
69f411d
02bc9f2
13c145a
4658d25
1e39f64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
pipeline_tag: text-generation
library_name: peft 
base_model: meta-llama/Llama-2-7b-hf
tags:
  - pytorch
  - llama-2
datasets:
- timdettmers/openassistant-guanaco
---

This model was fine-tuned using 4-bit QLoRa, following the instructions in https://huggingface.co/blog/llama2#fine-tuning-with-peft. 

The dataset includes 10k prompts.

I used a Amazon EC2 g5.xlarge instance (1xA10G GPU), with the Deep Learning AMI for PyTorch.
Training time was about 10 hours. On-demand price is about $10, which can easily be reduced to about $3 with EC2 Spot Instances.

The full log is included, as well as a simple inference script.

## Training procedure


The following `bitsandbytes` quantization config was used during training:
- quant_method: bitsandbytes
- load_in_8bit: False
- load_in_4bit: True
- 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