Chaiverse
  • Welcome to Chaiverse!
  • Quick Start
  • Prompting Guide
  • Rewards model
  • Blending Models
  • Getting Feedback
  • Talking to your model
  • Deactivating your Model
  • Leaderboard
  • 🤑Model Competition
  • How everything Works
    • 🤑Model Competition Explained
    • Rewards Model Explained
    • Prompt Guiding Explained
    • What we do with your model
Powered by GitBook
On this page
  • Import the library
  • How it works
  • Great You're Ready to Make your first template!

Prompting Guide

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

PreviousQuick StartNextRewards model

Last updated 1 year ago

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

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.

Prompt Guiding Explained
Deactivating your Model
Google Colaboratory
Prompt Guide overview
Logo