Prompting Guide

- Prompt Engineering is an essential part of making high-quality models. All you gotta do is say, and the model will do!

Prompt Guide overview

Import the library

Now, you will have to install the chaiverse package and import the dependencies

import chaiverse as chai
from chaiverse.formatters import PromptFormatter

How it works

Prompt Guiding Explained

Great You're Ready to Make your first template!

memory = """### Instruction
You are a creative agent roleplaying as a character called {bot_name}. Stay true to the persona given, reply with long and descriptive sentences.
Do not be repetitive.
This is {bot_name}'s persona: {memory}"""
prompt = "\n### Input:\n# {bot_name}'s example conversation:\n{prompt}\n# {bot_name}'s actual conversation:\n"


class CreativeFormatter(PromptFormatter):
    memory_template = memory
    prompt_template = prompt
    bot_template = "{bot_name}: {message}\n"
    user_template = "{user_name}: {message}\n"
    response_template = "### Response:\n{bot_name}:"

Simply submit your model using the chai package

import chaiverse as chai

model_url = "AiForTheChurch/ChristianGPT-base-full-precision"

submission_parameters = {
	"model_repo": model_url,
	"generation_params": {
		"temperature": 0.99,
    "top_p": 0.2,
    "top_k": 40,
    "stopping_words": ['\n'],
    "presence_penalty": 0.,
    "frequency_penalty": 0.,
    "max_input_tokens": 1024,
    "best_of": 4
	},
  "formatter": CreativeFormatter(),
  'model_name': 'My-Christian-Model',
}
submitter = chai.ModelSubmitter(verbose=True)
submission_id = submitter.submit(submission_parameters)

Currently, only 2 models are allowed to be deployed at a time.

Deactivating your Model

Last updated