phase2_winner_13b2 / README.md
zonemercy's picture
Update README.md
d925cbb
|
raw
history blame
1.53 kB

💬 Join us in Chai Prize Competition Discord

Model description

phase2_winner_13b was the winner model of Phase2 Chai Prize Competition, based on Llama-2-13b.

Submit model to Chai Prize Competition

Install the Chai Guanaco package:

pip install chai-guanaco

For one-off authentication run the following in your terminal:

chai-guanaco login

Submit model:

import chai_guanaco as chai

model_url = "ChaiML/phase2_winner_13b2"

generation_parameters = {
    'temperature': 0.8,
    'top_p': 0.2,
    "top_k": 40,
    "stopping_words": ['\n'],
    "presence_penalty": 0.,
    "frequency_penalty": 0.,
    }

submission_parameters = {
    'model_repo': model_url,
    'generation_params': generation_parameters,
    }

submitter = chai.ModelSubmitter()
submission_id = submitter.submit(submission_parameters)

Prompt formatting

from chai_guanaco.formatters import PromptFormatter

class PygmalionFormatter(PromptFormatter):
    memory_template = "{bot_name}'s Persona: {memory}\n####\n"
    prompt_template = "{prompt}\n<START>\n"
    bot_template = "{bot_name}: {message}\n"
    user_template = "{user_name}: {message}\n"
    response_template = "{bot_name}:"

Example of model input:

{bot_name}'s Persona: {memory}
####
{prompt}
<START>
[Historical conversations]
{bot_name}: