zonemercy commited on
Commit
f7bee05
1 Parent(s): 972dbcb

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +68 -0
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 💬 **Join us in Chai Prize Competition [Discord](https://discord.gg/7mXdjAkw2s)**
2
+
3
+ # Model description
4
+
5
+ **phase2_winner_13b** was the winner model of [Phase2 Chai Prize Competition](https://www.chai-research.com/competition.html).
6
+
7
+ # Submit model to Chai Prize Competition
8
+
9
+ Install the [Chai Guanaco package](https://pypi.org/project/chai-guanaco/):
10
+
11
+ ```
12
+ pip install chai-guanaco
13
+ ```
14
+
15
+ For one-off authentication run the following in your terminal:
16
+
17
+ ```
18
+ chai-guanaco login
19
+ ```
20
+
21
+ Submit model to competition:
22
+
23
+ ```python
24
+ import chai_guanaco as chai
25
+
26
+ model_url = "ChaiML/phase2_winner_13b2"
27
+
28
+ generation_parameters = {
29
+ 'temperature': 0.8,
30
+ 'top_p': 0.2,
31
+ "top_k": 40,
32
+ "stopping_words": ['\n'],
33
+ "presence_penalty": 0.,
34
+ "frequency_penalty": 0.,
35
+ }
36
+
37
+ submission_parameters = {
38
+ 'model_repo': model_url,
39
+ 'generation_params': generation_parameters,
40
+ }
41
+
42
+ submitter = chai.ModelSubmitter()
43
+ submission_id = submitter.submit(submission_parameters)
44
+ ```
45
+
46
+ # Prompt format
47
+
48
+ ```python
49
+ from chai_guanaco.formatters import PromptFormatter
50
+
51
+ class PygmalionFormatter(PromptFormatter):
52
+ memory_template = "{bot_name}'s Persona: {memory}\n####\n"
53
+ prompt_template = "{prompt}\n<START>\n"
54
+ bot_template = "{bot_name}: {message}\n"
55
+ user_template = "{user_name}: {message}\n"
56
+ response_template = "{bot_name}:"
57
+ ```
58
+
59
+ Example of model input:
60
+
61
+ ```
62
+ {bot_name}'s Persona: {memory}
63
+ ####
64
+ {prompt}
65
+ <START>
66
+ [Historical conversations]
67
+ {bot_name}:
68
+ ```