File size: 5,018 Bytes
147562c
 
 
 
e302c4f
147562c
e302c4f
147562c
 
 
e302c4f
 
 
147562c
 
 
 
 
 
e302c4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147562c
 
 
e302c4f
147562c
 
 
eae56ab
147562c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e302c4f
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
tags:
- generated_from_trainer
model-index:
- name: limarpv3-llama2-70b-qlora
  results: []
license: apache-2.0
---

[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
# limarpv3-llama2-70b-qlora

This model is an unofficial Llama 2 70B training on the LimaRP v3 dataset by [lemonilia](https://huggingface.co/lemonilia). It does not include the pretraining stage using stories.

It achieves the following results on the evaluation set:
- Loss: 1.8232

## Model description

For more details about LimaRP, see the model page for the [previously released v2 version for Llama-2](https://huggingface.co/lemonilia/limarp-llama2-v2). Most details written there apply for this version as well. Generally speaking, LimaRP is a longform-oriented, novel-style roleplaying chat model intended to replicate the experience of 1-on-1 roleplay on Internet forums. Short-form, IRC/Discord-style RP (aka "Markdown format") is not supported yet. The model does not include instruction tuning, only manually picked and slightly edited RP conversations with persona and scenario data.

Prompt format is the [extended Alpaca format](https://github.com/tatsu-lab/stanford_alpaca):

```
### Instruction:
Character's Persona: {bot character description}
User's Persona: {user character description}
Scenario: {what happens in the story}
Play the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User.
### Input:
User: {utterance}
### Response:
Character: {utterance}
### Input
User: {utterance}
### Response:
Character: {utterance}
(etc.)
```

Inspired by the previously named "Roleplay" preset in SillyTavern, with this version of LimaRP it is possible to append a length modifier to the response instruction sequence, like this:

```
### Input
User: {utterance}

### Response: (length = medium)
Character: {utterance}
```

This has an immediately noticeable effect on bot responses. The lengths using during training are:
`micro`, `tiny`, `short`, `medium`, `long`, `massive`, `huge`, `enormous`, `humongous`, `unlimited`.
**The recommended starting length is medium**. Keep in mind that the AI can ramble or impersonate
the user with very long messages.

The length control effect is reproducible, but the messages will not necessarily follow
lengths very precisely, rather follow certain ranges on average, as seen in this table
with data from tests made with one reply at the beginning of the conversation:

![lengths](https://i.imgur.com/2WXGgaV.png)

Response length control appears to work well also deep into the conversation. **By omitting
the modifier, the model will choose the most appropriate response length** (although it might
not necessarily be what the user desires).

## Intended uses & limitations

The model will show biases similar to those observed in niche roleplaying forums on the Internet, besides those exhibited by the base model.

## Training and evaluation data

For more details about LimaRP, see the model page for the [previously released v2 version for Llama-2](https://huggingface.co/lemonilia/limarp-llama2-v2).

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.00015
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 8
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 10
- num_epochs: 2

### Training results

| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:-----:|:----:|:---------------:|
| 1.8482        | 0.09  | 20   | 1.8569          |
| 1.6823        | 0.18  | 40   | 1.8400          |
| 1.779         | 0.27  | 60   | 1.8329          |
| 1.7776        | 0.36  | 80   | 1.8287          |
| 1.7773        | 0.45  | 100  | 1.8280          |
| 1.7328        | 0.53  | 120  | 1.8273          |
| 1.7349        | 0.62  | 140  | 1.8243          |
| 1.7789        | 0.71  | 160  | 1.8228          |
| 1.8113        | 0.8   | 180  | 1.8215          |
| 1.7           | 0.89  | 200  | 1.8203          |
| 1.7279        | 0.98  | 220  | 1.8201          |
| 1.7605        | 1.07  | 240  | 1.8225          |
| 1.7492        | 1.16  | 260  | 1.8245          |
| 1.7823        | 1.25  | 280  | 1.8235          |
| 1.6247        | 1.34  | 300  | 1.8247          |
| 1.6858        | 1.43  | 320  | 1.8246          |
| 1.6561        | 1.51  | 340  | 1.8240          |
| 1.7093        | 1.6   | 360  | 1.8240          |
| 1.6844        | 1.69  | 380  | 1.8235          |
| 1.6608        | 1.78  | 400  | 1.8233          |
| 1.7686        | 1.87  | 420  | 1.8233          |
| 1.7189        | 1.96  | 440  | 1.8232          |


### Framework versions

- Transformers 4.35.0.dev0
- Pytorch 2.0.1+cu118
- Datasets 2.14.5
- Tokenizers 0.14.1