Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to set mode and instruction_template #999

Answered by ruizcrp
ruizcrp asked this question in Q&A
Discussion options

Hi, I am trying to connect this frontend with the oobabooga API. While using oobabooga I get good answers but when I use it over this frontend connected to that API I get weird answers.
The parameters such as temperature should be set correctly in the model definition as provided in the README. I wonder if we can also set there the mode (i.e. instruct in my case for codellama) and the instruction_template. At the moment I think that this could be the cause of the issue. Maybe you have another idea?

I also set the "preprompt".
All in all this is the simplified definition:
MODELS=[ { "name": "codellama-7b-instruct.Q5_K_M.gguf", "displayName": "MYAPP", "id": "text-generation-webui", "preprompt": "Here is my prompt", "parameters": { "temperature": 1.0, "top_p": 0.95, "repetition_penalty": 1.0, "top_k": 50, "truncate": 10000, "max_new_tokens": 10000, "stop": [] }, "endpoints": [{ "type" : "openai", "baseURL": "http://hostname:5000/v1" }] } ]

You must be logged in to vote

Actually, just found in this files the parameters that are sent to open api endpoint:
https://github.com/huggingface/chat-ui/blob/main/src/lib/server/endpoints/openai/endpointOai.ts
I just added into my installation additional parameters such as top_k, mode and instruction_template. I don't know whether it could interest others as well to enlarge this part of the code to include more parameters.

Replies: 1 comment

Comment options

Actually, just found in this files the parameters that are sent to open api endpoint:
https://github.com/huggingface/chat-ui/blob/main/src/lib/server/endpoints/openai/endpointOai.ts
I just added into my installation additional parameters such as top_k, mode and instruction_template. I don't know whether it could interest others as well to enlarge this part of the code to include more parameters.

You must be logged in to vote
0 replies
Answer selected by ruizcrp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /