Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
thumbnail: null
|
5 |
+
tags:
|
6 |
+
- text generation
|
7 |
+
- instruct
|
8 |
+
pipeline_tag: text-generation
|
9 |
+
inference: false
|
10 |
+
---
|
11 |
+
<h1 style="text-align: center">Metharme 13b</h1>
|
12 |
+
<h2 style="text-align: center">An instruction-tuned LLaMA biased towards fiction writing and conversation.</h2>
|
13 |
+
|
14 |
+
## Model Details:
|
15 |
+
|
16 |
+
Converted from the XORs weights from PygmalionAI's release https://huggingface.co/PygmalionAI/metharme-13b
|
17 |
+
|
18 |
+
|
19 |
+
Metharme 13b is an instruct model based on Meta's LLaMA-13b.
|
20 |
+
|
21 |
+
This is an experiment to try and get a model that is usable for conversation, roleplaying and storywriting, but which can be guided using natural language like other instruct models. See the [prompting](#prompting) section below for examples.
|
22 |
+
|
23 |
+
It was trained by doing supervised fine-tuning over a mixture of regular instruction data alongside roleplay, fictional stories and conversations with synthetically generated instructions attached.
|
24 |
+
|
25 |
+
## Prompting
|
26 |
+
|
27 |
+
The current model version has been trained on prompts using three different roles, which are denoted by the following tokens: `<|system|>`, `<|user|>` and `<|model|>`.
|
28 |
+
|
29 |
+
The `<|system|>` prompt can be used to inject out-of-channel information behind the scenes, while the `<|user|>` prompt should be used to indicate user input. The `<|model|>` token should then be used to indicate that the model should generate a response. These tokens can happen multiple times and be chained up to form a conversation history.
|
30 |
+
|
31 |
+
### Prompting example
|
32 |
+
|
33 |
+
Here's a concrete example. Let's say you have the following system prompt:
|
34 |
+
|
35 |
+
> This is a text adventure game. Describe the scenario to the user and give him three options to pick from on each turn.
|
36 |
+
|
37 |
+
And the user has typed in the following message:
|
38 |
+
|
39 |
+
> Start!
|
40 |
+
|
41 |
+
To perform inference against the model, the prompt should be formatted like this:
|
42 |
+
|
43 |
+
```
|
44 |
+
<|system|>This is a text adventure game. Describe the scenario to the user and give him three options to pick from on each turn.<|user|>Start!<|model|>
|
45 |
+
```
|
46 |
+
|
47 |
+
The model might generate something like:
|
48 |
+
|
49 |
+
> You are standing in front of an old, abandoned house. The windows are boarded up, and there's no sign of life around it. As you approach, you notice a strange feeling emanating from within. Suddenly, you hear a voice calling out to you... 'Come inside!'
|
50 |
+
>
|
51 |
+
> - Go inside the house.
|
52 |
+
> - Ignore the call and move away.
|
53 |
+
> - Run as fast as you can.
|
54 |
+
|
55 |
+
It will automatically emit an end-of-text token (`</s>`) when it judges that the response is complete.
|
56 |
+
|
57 |
+
Pretend then that the user has replied with `go inside`. The next prompt should then be:
|
58 |
+
|
59 |
+
```
|
60 |
+
<|system|>This is a text adventure game. Describe the scenario to the user and give him three options to pick from on each turn.<|user|>Start!<|model|>You are standing in front of an old, abandoned house. The windows are boarded up, and there's no sign of life around it. As you approach, you notice a strange feeling emanating from within. Suddenly, you hear a voice calling out to you... 'Come inside!'
|
61 |
+
|
62 |
+
- Go inside the house.
|
63 |
+
- Ignore the call and move away.
|
64 |
+
- Run as fast as you can.<|user|>go inside<|model|>
|
65 |
+
```
|
66 |
+
|
67 |
+
Which might generate something like:
|
68 |
+
|
69 |
+
> You enter the house, and immediately, a wave of unsettling energy washes over you. Your senses seem heightened, but your mind feels foggy. A figure appears before you - a tall man with piercing eyes. He speaks to you in a language you don't understand.
|
70 |
+
>
|
71 |
+
> - Ask him what he wants.
|
72 |
+
> - Attack him.
|
73 |
+
> - Run away.
|
74 |
+
|
75 |
+
Same process applies. Usually, it is best to do a sliding window over the user and model turns, but keep the system prompt fixed at the start of the context window.
|
76 |
+
|
77 |
+
## Limitations and biases
|
78 |
+
|
79 |
+
The intended use-case for this model is fictional writing for entertainment purposes. Any other sort of usage is out of scope.
|
80 |
+
|
81 |
+
As such, it was **not** fine-tuned to be safe and harmless: the base model _and_ this fine-tune have been trained on data known to contain profanity and texts that are lewd or otherwise offensive. It may produce socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive. Outputs might often be factually wrong or misleading.
|