FirstLast commited on
Commit
7feaac2
1 Parent(s): b48a5bf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -0
README.md CHANGED
@@ -5,6 +5,32 @@ library_name: peft
5
  # OpenLLaMa 3B PersonaChat
6
  This is a LoRA finetune of [OpenLLaMa 3B](https://huggingface.co/openlm-research/open_llama_3b) on the [personachat-truecased](https://huggingface.co/datasets/bavard/personachat_truecased) dataset with 3 epochs of 500 steps.
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ## Naming Format
9
  [model name]-finetuned-[dataset]-e[number of epochs]-s[number of steps]
10
 
 
5
  # OpenLLaMa 3B PersonaChat
6
  This is a LoRA finetune of [OpenLLaMa 3B](https://huggingface.co/openlm-research/open_llama_3b) on the [personachat-truecased](https://huggingface.co/datasets/bavard/personachat_truecased) dataset with 3 epochs of 500 steps.
7
 
8
+ ## Use
9
+ Before using this model, you must first add these extra tokens:
10
+ ```python
11
+ tokenizer.add_special_tokens({"additional_special_tokens": ["<|human|>", "<|bot|>", "<|endoftext|>"]})
12
+ model.resize_token_embeddings(len(tokenizer))
13
+ ```
14
+ The model is finetuned with the format is as follows:
15
+ ```
16
+ Personality:
17
+ - [...]
18
+ - [...]
19
+ <|human|>Hi there!<|endoftext|><|bot|>Hello!<|endoftext|>
20
+ ```
21
+ To use this model, you must first define the personalities.
22
+ ```python
23
+ personalities = """Personality:
24
+ - [...]
25
+ - [...]
26
+ """
27
+ ```
28
+ Then, follow the format:
29
+ ```python
30
+ user = input(">>> ")
31
+ prompt = f"{personalities}<|human|>{user}<|endoftext|><|bot|>"
32
+ ```
33
+
34
  ## Naming Format
35
  [model name]-finetuned-[dataset]-e[number of epochs]-s[number of steps]
36