Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Instruct Templating #45

Open
Juxsta opened this issue Jul 10, 2024 · 5 comments
Open

[Feature Request] Instruct Templating #45

Juxsta opened this issue Jul 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Juxsta
Copy link

Juxsta commented Jul 10, 2024

Would it be possible to supply an option for using an instruction template using Jinja? This would significantly improve the performance of instruct models.

@Juxsta
Copy link
Author

Juxsta commented Jul 10, 2024

For an MVP a possible solution could be to allow a custom prompt parameter where you can pass in a template and variables similar to the way the current aiuser prompt setting works

@zhaobenny
Copy link
Owner

From what I understand, the Jinja template is to mostly translate to a format more suitable for instruct models?

Does existing OpenAI proxy servers not do that type of translation for instruct models already?

@Juxsta
Copy link
Author

Juxsta commented Jul 11, 2024

I don't believe this is a supported feature since you would need to be able to pull variables from the prompt to support it. This would be possible if the prompt was constructed in such a way the templating could be done through the proxy, but at that point, the templating may as well have been done on the client.

@Juxsta
Copy link
Author

Juxsta commented Jul 11, 2024

Just for clarity the feature request I'm proposing is being able to make a setting such as

template: -| 
 <s> [INST] You are {bot_name}. You are responding in a discord chat room in the {discord_server} in the {discord_channel} channel. 
 Your personality traits are:
 {Persona}
 [/INST] 
 </s>
 Message History: 
 {Message History}
 [INST] Respond as {bot_name} [/INST]
 {bot_name}:

@zhaobenny
Copy link
Owner

Ah, I understand now.

Currently, the cog is not greatly compatible with instruct models (mostly because I found chat models better to chat with and easier to prompt with). I'll see if I can add this feature whenever I get to improving compatibility with instruct models.

@zhaobenny zhaobenny added the enhancement New feature or request label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants