File size: 886 Bytes
7a7861b
 
e988e5b
dd20d2e
e988e5b
dd20d2e
e988e5b
dd20d2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
datasets:
  - izumi-lab/llm-japanese-dataset
language:
  - ja
tags:
  - llama
  - causal-lm
---

This repo contains a low-rank adapter for LLaMA-13b
fit on the [llm-japanese-dataset](https://github.com/masanorihirano/llm-japanese-dataset) dataset.

This version of the weights was trained with the following hyperparameters:

- Epochs: 1
- Batch size: 130
- Cutoff length: 256
- Learning rate: 3e-4
- Lora _r_: 4
- Lora target modules: q_proj, v_proj

```python
import torch
from transformers import LlamaForCausalLM, LlamaTokenizer
from peft import PeftModel

base_model = "decapoda-research/llama-13b-hf"
model = LlamaForCausalLM.from_pretrained(base_model, torch_dtype=torch.float16)
tokenizer = LlamaTokenizer.from_pretrained(base_model)
model = PeftModel.from_pretrained(
    model,
    "izumi-lab/llama-13b-japanese-lora-v0",
    torch_dtype=torch.float16,
)
```