ananda-chai
commited on
Commit
·
3727f3f
1
Parent(s):
c428e0d
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Winner of The Chaiverse Competition : Season 4
|
2 |
+
|
3 |
+
[Chaiverse : Crowdsourcing AGI](https://chaiverse.com)
|
4 |
+
|
5 |
+
To know more about the Competition you can also visit our open source [Github](https://github.com/chai-research/chaiverse) package
|
6 |
+
|
7 |
+
|
8 |
+
### Install Chaiverse
|
9 |
+
|
10 |
+
```
|
11 |
+
pip install -U chaiverse
|
12 |
+
```
|
13 |
+
|
14 |
+
### Login
|
15 |
+
|
16 |
+
```
|
17 |
+
import chaiverse as chai
|
18 |
+
chai.developer_login()
|
19 |
+
```
|
20 |
+
|
21 |
+
### Submitting this specific Model with configuration
|
22 |
+
|
23 |
+
```
|
24 |
+
import chaiverse as chai
|
25 |
+
from chaiverse.formatters import PromptFormatter
|
26 |
+
|
27 |
+
model_url = "ChaiML/season_4_top_solution"
|
28 |
+
|
29 |
+
|
30 |
+
class CustomFormatter(PromptFormatter):
|
31 |
+
memory_template = (
|
32 |
+
"### Instruction:\nAs the assistant, your task is to fully embody the "
|
33 |
+
"given character, creating immersive, captivating narratives. Stay true "
|
34 |
+
"to the character's personality and background, generating responses "
|
35 |
+
"that not only reflect their core traits but are also accurate to their "
|
36 |
+
"character. Your responses should evoke emotion, suspense, and "
|
37 |
+
"anticipation in the user. The more detailed and descriptive your "
|
38 |
+
"response, the more vivid the narrative becomes. Aim to create a "
|
39 |
+
"fertile environment for ongoing interaction – introduce new elements, "
|
40 |
+
"offer choices, or ask questions to invite the user to participate more "
|
41 |
+
"fully in the conversation. This conversation is a dance, always "
|
42 |
+
"continuing, always evolving.\nYour character: {bot_name}.\nContext: "
|
43 |
+
"{memory}\n"
|
44 |
+
)
|
45 |
+
prompt_template = "### Input:\n{prompt}\n"
|
46 |
+
bot_template = "{bot_name}: {message}\n"
|
47 |
+
user_template = "{user_name}: {message}\n"
|
48 |
+
response_template = "### Response:\n{bot_name}:"
|
49 |
+
|
50 |
+
|
51 |
+
generation_params = {
|
52 |
+
'temperature': 1.1,
|
53 |
+
'top_p': 1.0,
|
54 |
+
"top_k": 20,
|
55 |
+
"stopping_words": ['\n', '</s>', '<|im_end|>'],
|
56 |
+
"presence_penalty": 0.0,
|
57 |
+
"frequency_penalty": 0.0,
|
58 |
+
"max_input_tokens": 2048,
|
59 |
+
"best_of": 4
|
60 |
+
}
|
61 |
+
|
62 |
+
submission_parameters = {'model_repo': model_url,
|
63 |
+
'generation_params': generation_params, 'model_name': 'season-4-model'}
|
64 |
+
|
65 |
+
submitter = chai.ModelSubmitter(verbose=True)
|
66 |
+
submission_id = submitter.submit(submission_parameters)
|
67 |
+
```
|