File size: 1,706 Bytes
0c255b9
 
684cf74
 
c03573d
 
 
0c255b9
3a61f88
 
0855b35
 
 
 
 
 
1795a6e
c4761a6
 
8bcec92
3a61f88
c03573d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0c255b9
c03573d
 
 
 
 
 
 
 
0c255b9
 
 
 
 
 
 
 
 
 
 
 
 
 
684cf74
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
library_name: peft
datasets:
- HachiML/databricks-dolly-15k-ja-for-peft
language:
- en
- ja
---
## JGLUE Score
We evaluated our model using the following JGLUE tasks. Here are the scores:
| Task                | Score     |
|---------------------|----------:|
| JCOMMONSENSEQA(acc) | 75.78     |
| JNLI(acc)           | 50.69     |
| MARC_JA(acc)        | 79.64     |
| JSQUAD(exact_match) | 62.83     |
| **Average**         | **67.23** |
- Note: Use v0.3 prompt template
- The JGLUE scores were measured using the following script:
[Stability-AI/lm-evaluation-harness](https://github.com/Stability-AI/lm-evaluation-harness/tree/jp-stable)

## How to use

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, AutoTokenizer
from peft import PeftModel

model_name = "meta-llama/Llama-2-13b-hf"
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_use_double_quant=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.float16,
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
pt_model = AutoModelForCausalLM.from_pretrained(
    model_name,
    quantization_config=bnb_config,
)

peft_name = "HachiML/Llama-2-13b-hf-qlora-dolly-ja-2ep"
model = PeftModel.from_pretrained(
    pt_model,
    peft_name,
)
```

## Training procedure

The following `bitsandbytes` quantization config was used during training:
- 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: nf4
- bnb_4bit_use_double_quant: True
- bnb_4bit_compute_dtype: float16
### Framework versions


- PEFT 0.4.0