File size: 3,045 Bytes
3727f3f
 
 
 
df7f566
ef20418
 
 
 
 
 
df7f566
ef20418
3727f3f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ef20418
3727f3f
 
 
 
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
## Winner of The Chaiverse Competition : Season 4

[Chaiverse : Crowdsourcing AGI](https://chaiverse.com) 

Chaiverse is crowdsourcing AGI. You can submit your models to the Chaiverse platform with just 4 lines of code and get it deployed to millions of Chai users.
Your model receives immediate feedback from real users which help you finetune and improve. Chaiverse helps you monetize your LLM and also provides an opportunity
to test it with real users after passing our internal Safety Standards. The Chaiverse Competition has a total payout of 1 Millon Dollars over multiple seasons. 

To know more about the Competition you can also visit our open source [Github](https://github.com/chai-research/chaiverse) package or 
visit our [Discord](https://discord.gg/chai-llm) to be more involved with our community.

This model was trained by [Vietahn](https://huggingface.co/anhnv125). The [write up](https://anhnv125.notion.site/My-Season-IV-Solution-8e12b0d98bad43c988459aeb97ef3b53) explains how this model was trained. 
The competition prize money was $10,000 for the first place.


### Install Chaiverse

```
pip install -U chaiverse
```

### Login 

```
import chaiverse as chai
chai.developer_login()
```

### Submitting this specific Model with configuration

```
import chaiverse as chai
from chaiverse.formatters import PromptFormatter

model_url = "ChaiML/season_4_top_solution"


class CustomFormatter(PromptFormatter):
    memory_template = (
        "### Instruction:\nAs the assistant, your task is to fully embody the "
        "given character, creating immersive, captivating narratives. Stay true "
        "to the character's personality and background, generating responses "
        "that not only reflect their core traits but are also accurate to their "
        "character. Your responses should evoke emotion, suspense, and "
        "anticipation in the user. The more detailed and descriptive your "
        "response, the more vivid the narrative becomes. Aim to create a "
        "fertile environment for ongoing interaction – introduce new elements, "
        "offer choices, or ask questions to invite the user to participate more "
        "fully in the conversation. This conversation is a dance, always "
        "continuing, always evolving.\nYour character: {bot_name}.\nContext: "
        "{memory}\n"
    )
    prompt_template = "### Input:\n{prompt}\n"
    bot_template = "{bot_name}: {message}\n"
    user_template = "{user_name}: {message}\n"
    response_template = "### Response:\n{bot_name}:"


generation_params = {
    'temperature': 1.1,
    'top_p': 1.0,
    "top_k": 20,
    "stopping_words": ['\n', '</s>', '<|im_end|>'],
    "presence_penalty": 0.0,
    "frequency_penalty": 0.0,
    "max_input_tokens": 2048,
    "best_of": 4
}

submission_parameters = {'model_repo': model_url, 'generation_params': generation_params, 'model_name': 'season-2-model', 'formatter': CustomFormatter()}

submitter = chai.ModelSubmitter(verbose=True)
submission_id = submitter.submit(submission_parameters)
```