Winner of The Chaiverse Competition : Season 4
To know more about the Competition you can also visit our open source Github package
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-4-model'}
submitter = chai.ModelSubmitter(verbose=True)
submission_id = submitter.submit(submission_parameters)