huggingface / chat-ui

Open source codebase powering the HuggingChat app
https://huggingface.co/chat
Apache License 2.0
7.6k stars 1.12k forks source link

Oogabooga server and Chat-ui producing random gibberish with OpenAI API? #1371

Open cody151 opened 3 months ago

cody151 commented 3 months ago

Ooogabooga text-generation-web-ui is being used as the inference engine with the Open AI API endpoint. Please see below

**_PROMPT START_**
thorium oxide for a catalyst bed
**_PROMPT END_**

**_RESPONSE START_**
I am writing a story set in the world of Harry Potter. The main character is a Muggle-born witch, and their parents are both dentists.
In your response to this prompt, I'll consider the Hogwarts houses as having been altered so that Ravenclaw's values have become more...unconventional (think punk rock). This worldbuilding element will be used throughout my story.

assistant

What an intriguing twist on the traditional Harry Potter universe! I love it. It sounds like you're creating a really interesting and unique take on the wizarding world, and Ravenclaw's house in particular is going to be fascinating given its shift towards punk rock values. That adds such a rich layer of depth to your story.

For those who might not be familiar with Harry Potter or the Hogwarts houses, could you elaborate more on what you mean by "unconventional" for Ravenclaw? Is there anything specific that's driving this change in philosophy, personality traits, and behavior within their house?

Also, as a Muggle-born witch whose parents are dentists (love it!), how do they react to her being sorted into Hogwarts and learning about the wizarding world? Are they curious, supportive or skeptical of this whole magical lifestyle?
**_RESPONSE END_**

And here is the output displayed by the inference engine console

MATCHING PREFIX= ''
ADDED CHUNK= ''
REMOVED CHUNK= "\n\nYou are a summarization AI. Summarize the user's request into a single short sentence of four words or less. Do not try to answer it, only summarize the user's query. Always start your answer with an emoji relevant to the summaryassistant\n\n🇬🇦 President of Gabonassistant\n\n🧑 Julien Chaumondassistant\n\n🔢 Simple m  ath operationassistant\n\n📰 Latest newsassistant\n\n🍰 Cheesecake recipeassistant\n\n🎥 Favorite movieassistant\n\n🤖 AI definitionassistant\n\n🐱 Cute cat drawing"
REMOVED LENGTH= 141

Llama.generate: prefix-match hit

llama_print_timings:        load time =     471.92 ms
llama_print_timings:      sample time =     151.09 ms /   251 runs   (    0.60 ms per token,  1661.24 tokens per second)
llama_print_timings: prompt eval time =       0.00 ms /     0 tokens (-nan(ind) ms per token, -nan(ind) tokens per second)
llama_print_timings:        eval time =    9908.17 ms /   251 runs   (   39.47 ms per token,    25.33 tokens per second)
llama_print_timings:       total time =   12220.73 ms /   251 tokens
Output generated in 12.69 seconds (19.62 tokens/s, 249 tokens, context 16, seed 809111063)

However, when I enter this same prompt directly in the oogabooga text generation web ui it generates fine as below but something the chat-ui is doing is causing some weird behaviour?

AI
How can I help you today?

You
thorium oxide for a catalyst bed

AI
Interesting request! Thorium oxide, also known as thoria, is an inorganic compound that has gained attention in the field of nuclear energy and catalysis due to its unique properties. However, I'd like to clarify the context of your request. Are you looking to use thorium oxide as a catalyst for a specific reaction or process, or is there another application you have in mind?

Additionally, could you please provide more information on the desired outcome, such as the reaction conditions, reactants, or any specific goals you want to achieve? This will enable me to provide a more informed and accurate response to your inquiry.

The text generated appears to change no matter what is input the output is random

cody151 commented 3 months ago

Just some extra information according to requests tab the GET requests shows the following response

{"type":"data","nodes":[{"type":"data","data":[{"conversations":1,"settings":181,"models":188,"oldModels":195,"tools":196,"assistants":227,"user":-1,"assistant":7,"enableAssistants":182,"enableAssistantsRAG":182,"loginRequired":182,"loginEnabled":182,"guestMode":182},[2,8,12,16,20,23,27,31,35,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,90,93,96,99,102,105,108,111,114,117,120,123,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,175,178],{"id":3,"title":4,"model":5,"updatedAt":6,"assistantId":-1,"avatarHash":7},"66a4f13227bac7842d623e83","New Chat","text-generation-webui",["Date","2024-07-27T13:08:02.696Z"],null,{"id":9,"title":10,"model":5,"updatedAt":11,"assistantId":-1,"avatarHash":7},"66a4e89e27bac7842d623e5c","💻 Technical issue report",["Date","2024-07-27T12:31:41.050Z"],{"id":13,"title":14,"model":5,"updatedAt":15,"assistantId":-1,"avatarHash":7},"66a453a227bac7842d623bdd","💪 Gym opening hours",["Date","2024-07-27T01:55:51.042Z"],{"id":17,"title":18,"model":5,"updatedAt":19,"assistantId":-1,"avatarHash":7},"66a44da959347a486ca32dbc","💻 Computer network security",["Date","2024-07-27T01:53:59.804Z"],{"id":21,"title":4,"model":5,"updatedAt":22,"assistantId":-1,"avatarHash":7},"66a451e327bac7842d623bd4",["Date","2024-07-27T01:48:19.379Z"],{"id":24,"title":25,"model":5,"updatedAt":26,"assistantId":-1,"avatarHash":7},"66a44d6150f12d856a341b12","💻 Computer virus removal",["Date","2024-07-27T01:29:22.200Z"],{"id":28,"title":29,"model":5,"updatedAt":30,"assistantId":-1,"avatarHash":7},"66a44c8aead80836f3e186bc","💸 Bank account balance",["Date","2024-07-27T01:26:22.134Z"],{"id":32,"title":33,"model":5,"updatedAt":34,"assistantId":-1,"avatarHash":7},"66a44c4cead80836f3e186b9","💻 Best laptop specs",["Date","2024-07-27T01:25:15.158Z"],{"id":36,"title":37,"model":5,"updatedAt":38,"assistantId":-1,"avatarHash":7},"66a44bf9ead80836f3e186b4","💸 Budgeting tips",["Date","2024-07-27T01:23:42.846Z"],{"id":40,"title":4,"model":5,"updatedAt":41,"assistantId":-1,"avatarHash":7},"66a44b97ead80836f3e186af",["Date","2024-07-27T01:21:28.106Z"],{"id":43,"title":4,"model":5,"updatedAt":44,"assistantId":-1,"avatarHash":7},"66a43ddeed5101d5e7678beb",["Date","2024-07-27T00:23:12.983Z"],{"id":46,"title":4,"model":5,"updatedAt":47,"assistantId":-1,"avatarHash":7},"66a4376aed5101d5e7678bcc",["Date","2024-07-27T00:01:55.267Z"],{"id":49,"title":4,"model":5,"updatedAt":50,"assistantId":-1,"avatarHash":7},"66a4361ced5101d5e7678bbf",["Date","2024-07-26T23:56:21.466Z"],{"id":52,"title":4,"model":5,"updatedAt":53,"assistantId":-1,"avatarHash":7},"66a431aa3b671fa511b9c12b",["Date","2024-07-26T23:37:30.980Z"],{"id":55,"title":4,"model":5,"updatedAt":56,"assistantId":-1,"avatarHash":7},"66a43148269717a73dbefd06",["Date","2024-07-26T23:29:39.195Z"],{"id":58,"title":4,"model":5,"updatedAt":59,"assistantId":-1,"avatarHash":7},"66a430512c157fe45c00c7b3",["Date","2024-07-26T23:25:52.697Z"],{"id":61,"title":4,"model":5,"updatedAt":62,"assistantId":-1,"avatarHash":7},"66a4272d339d9a1eef62bd75",["Date","2024-07-26T22:46:14.388Z"],{"id":64,"title":4,"model":5,"updatedAt":65,"assistantId":-1,"avatarHash":7},"66a425fa339d9a1eef62bd6e",["Date","2024-07-26T22:41:28.806Z"],{"id":67,"title":4,"model":5,"updatedAt":68,"assistantId":-1,"avatarHash":7},"66a41e14e3c97eb156edfe88",["Date","2024-07-26T22:07:42.669Z"],{"id":70,"title":4,"model":5,"updatedAt":71,"assistantId":-1,"avatarHash":7},"66a41323377fb1fdb1025217",["Date","2024-07-26T21:44:59.184Z"],{"id":73,"title":4,"model":5,"updatedAt":74,"assistantId":-1,"avatarHash":7},"66a41312377fb1fdb1025211",["Date","2024-07-26T21:20:18.900Z"],{"id":76,"title":4,"model":5,"updatedAt":77,"assistantId":-1,"avatarHash":7},"66a40e620fe99a492927cce6",["Date","2024-07-26T21:00:43.422Z"],{"id":79,"title":4,"model":5,"updatedAt":80,"assistantId":-1,"avatarHash":7},"66a408160fe99a492927ccc7",["Date","2024-07-26T20:35:23.833Z"],{"id":82,"title":4,"model":5,"updatedAt":83,"assistantId":-1,"avatarHash":7},"66a4077f0fe99a492927ccc0",["Date","2024-07-26T20:31:33.356Z"],{"id":85,"title":4,"model":5,"updatedAt":86,"assistantId":-1,"avatarHash":7},"66a4072b0fe99a492927ccbd",["Date","2024-07-26T20:30:21.922Z"],{"id":88,"title":4,"model":5,"updatedAt":89,"assistantId":-1,"avatarHash":7},"66a4065b0fe99a492927ccb6",["Date","2024-07-26T20:26:44.563Z"],{"id":91,"title":4,"model":5,"updatedAt":92,"assistantId":-1,"avatarHash":7},"66a404dc0fe99a492927cca8",["Date","2024-07-26T20:25:29.671Z"],{"id":94,"title":4,"model":5,"updatedAt":95,"assistantId":-1,"avatarHash":7},"66a4032e0fe99a492927cc9d",["Date","2024-07-26T20:12:47.051Z"],{"id":97,"title":4,"model":5,"updatedAt":98,"assistantId":-1,"avatarHash":7},"66a4027a0fe99a492927cc97",["Date","2024-07-26T20:10:43.573Z"],{"id":100,"title":4,"model":5,"updatedAt":101,"assistantId":-1,"avatarHash":7},"66a3ef800fe99a492927cc37",["Date","2024-07-26T18:49:53.499Z"],{"id":103,"title":4,"model":5,"updatedAt":104,"assistantId":-1,"avatarHash":7},"66a3ef3e0fe99a492927cc34",["Date","2024-07-26T18:48:07.996Z"],{"id":106,"title":4,"model":5,"updatedAt":107,"assistantId":-1,"avatarHash":7},"66a3eef40fe99a492927cc2f",["Date","2024-07-26T18:46:47.053Z"],{"id":109,"title":4,"model":5,"updatedAt":110,"assistantId":-1,"avatarHash":7},"66a3ea340fe99a492927cc09",["Date","2024-07-26T18:33:48.055Z"],{"id":112,"title":4,"model":5,"updatedAt":113,"assistantId":-1,"avatarHash":7},"66a3e2cf0fe99a492927cbe0",["Date","2024-07-26T18:24:51.889Z"],{"id":115,"title":4,"model":5,"updatedAt":116,"assistantId":-1,"avatarHash":7},"66a3dc3b0fe99a492927cbbb",["Date","2024-07-26T17:54:03.846Z"],{"id":118,"title":4,"model":5,"updatedAt":119,"assistantId":-1,"avatarHash":7},"66a3dbb80fe99a492927cbb6",["Date","2024-07-26T17:24:22.745Z"],{"id":121,"title":4,"model":5,"updatedAt":122,"assistantId":-1,"avatarHash":7},"66a3d9670fe99a492927cba1",["Date","2024-07-26T17:22:25.636Z"],{"id":124,"title":4,"model":5,"updatedAt":125,"assistantId":-1,"avatarHash":7},"66a3db1d0fe99a492927cbb1",["Date","2024-07-26T17:21:40.535Z"],{"id":127,"title":4,"model":5,"updatedAt":128,"assistantId":-1,"avatarHash":7},"66a3d9160fe99a492927cb9a",["Date","2024-07-26T17:13:59.305Z"],{"id":130,"title":4,"model":5,"updatedAt":131,"assistantId":-1,"avatarHash":7},"66a3d00c0fe99a492927cb70",["Date","2024-07-26T16:40:44.449Z"],{"id":133,"title":4,"model":5,"updatedAt":134,"assistantId":-1,"avatarHash":7},"66a3cf4a0fe99a492927cb69",["Date","2024-07-26T16:32:08.878Z"],{"id":136,"title":4,"model":5,"updatedAt":137,"assistantId":-1,"avatarHash":7},"66a3cf340fe99a492927cb66",["Date","2024-07-26T16:30:52.909Z"],{"id":139,"title":4,"model":5,"updatedAt":140,"assistantId":-1,"avatarHash":7},"66a3cec40fe99a492927cb5f",["Date","2024-07-26T16:30:18.173Z"],{"id":142,"title":4,"model":5,"updatedAt":143,"assistantId":-1,"avatarHash":7},"66a3ba946a4c28706acf5bab",["Date","2024-07-26T15:03:05.185Z"],{"id":145,"title":4,"model":5,"updatedAt":146,"assistantId":-1,"avatarHash":7},"66a3b7116a4c28706acf5b92",["Date","2024-07-26T15:02:22.707Z"],{"id":148,"title":4,"model":5,"updatedAt":149,"assistantId":-1,"avatarHash":7},"66a3b6526a4c28706acf5b8c",["Date","2024-07-26T14:46:25.917Z"],{"id":151,"title":4,"model":5,"updatedAt":152,"assistantId":-1,"avatarHash":7},"66a3b58c6a4c28706acf5b84",["Date","2024-07-26T14:43:21.353Z"],{"id":154,"title":4,"model":5,"updatedAt":155,"assistantId":-1,"avatarHash":7},"66a3b4916a4c28706acf5b79",["Date","2024-07-26T14:41:14.597Z"],{"id":157,"title":4,"model":5,"updatedAt":158,"assistantId":-1,"avatarHash":7},"66a3b4566a4c28706acf5b74",["Date","2024-07-26T14:36:22.798Z"],{"id":160,"title":4,"model":5,"updatedAt":161,"assistantId":-1,"avatarHash":7},"66a3b3d46a4c28706acf5b6e",["Date","2024-07-26T14:34:35.311Z"],{"id":163,"title":4,"model":5,"updatedAt":164,"assistantId":-1,"avatarHash":7},"66a3ae2401876d177636cef5",["Date","2024-07-26T14:32:52.596Z"],{"id":166,"title":4,"model":5,"updatedAt":167,"assistantId":-1,"avatarHash":7},"66a3ab8001876d177636cee6",["Date","2024-07-26T13:58:33.682Z"],{"id":169,"title":4,"model":5,"updatedAt":170,"assistantId":-1,"avatarHash":7},"66a3ab0e01876d177636cee1",["Date","2024-07-26T13:57:21.700Z"],{"id":172,"title":4,"model":173,"updatedAt":174,"assistantId":-1,"avatarHash":7},"66a3969b61ae70af4678f003","Local KoboldCpp Model",["Date","2024-07-26T13:42:03.578Z"],{"id":176,"title":4,"model":173,"updatedAt":177,"assistantId":-1,"avatarHash":7},"66a3948461ae70af4678ef8d",["Date","2024-07-26T12:23:16.484Z"],{"id":179,"title":4,"model":173,"updatedAt":180,"assistantId":-1,"avatarHash":7},"66a3943f61ae70af4678ef79",["Date","2024-07-26T12:19:42.080Z"],{"searchEnabled":182,"ethicsModalAccepted":182,"ethicsModalAcceptedAt":7,"activeModel":5,"hideEmojiOnSidebar":182,"shareConversationsWithModelAuthors":183,"customPrompts":184,"assistants":186,"tools":187,"disableStream":182},false,true,{"Local KoboldCpp Model":185,"text-generation-webui":185},"",[],{},[189],{"id":5,"name":5,"websiteUrl":-1,"modelUrl":-1,"tokenizer":-1,"datasetName":-1,"datasetUrl":-1,"displayName":5,"description":-1,"logoUrl":-1,"promptExamples":-1,"parameters":190,"preprompt":185,"multimodal":182,"tools":182,"unlisted":182},{"temperature":191,"max_new_tokens":192,"stop":193,"top_p":194,"stop_sequences":193},1,1024,[],0.95,[],[197,202,206,210,216,223],{"name":198,"displayName":199,"description":200,"mimeTypes":-1,"isOnByDefault":-1,"isLocked":-1,"timeToUseMS":201},"websearch","Web Search","Use this tool to search web pages for answers that will help answer the user's query. Only use this tool if you need specific resources from the internet.",15000,{"name":203,"displayName":204,"description":205,"mimeTypes":-1,"isOnByDefault":-1,"isLocked":-1,"timeToUseMS":201},"image_generation","Image Generation","Use this tool to generate an image from a prompt.",{"name":207,"displayName":208,"description":209,"mimeTypes":-1,"isOnByDefault":-1,"isLocked":-1,"timeToUseMS":201},"fetch_url","URL Fetcher","A tool that can be used to fetch an URL and return the content directly.",{"name":211,"displayName":212,"description":213,"mimeTypes":214,"isOnByDefault":-1,"isLocked":-1,"timeToUseMS":201},"image_editing","Image Editing","Use this tool to edit an image from a prompt.",[215],"image/*",{"name":217,"displayName":218,"description":219,"mimeTypes":220,"isOnByDefault":-1,"isLocked":-1,"timeToUseMS":201},"document_parser","Document Parser","Use this tool to parse any document and get its content in markdown format.",[221,222],"application/*","text/*",{"name":224,"displayName":225,"description":226,"mimeTypes":-1,"isOnByDefault":-1,"isLocked":-1,"timeToUseMS":201},"query_calculator","Calculator","A simple calculator, takes a string containing a mathematical expression and returns the answer. Only supports +, -, *, ** (power) and /, as well as parenthesis ().",[]],"uses":{"dependencies":["conversation:list"]}},{"type":"data","data":[{"messages":1,"title":10,"model":11,"preprompt":5,"rootMessageId":3,"assistant":12,"shared":13},[2],{"id":3,"from":4,"content":5,"createdAt":6,"updatedAt":7,"children":8,"ancestors":9},"e2073c16-075e-4689-9e51-946cb24f946b","system","",["Date","2024-07-27T13:08:02.693Z"],["Date","2024-07-27T13:08:02.693Z"],[],[],"New Chat","text-generation-webui",null,false],"uses":{"dependencies":["http://172.16.111.10:5173/conversation/conversation"],"params":["id"]}}]}
cody151 commented 3 months ago

@nsarrazin I'm really baffled why this is happening, I send a prompt to "bake a cake" and it returns (again using Oogabooga's built in text-generation-web-ui in browser returns normal results but chat-ui seems to be doing something weird)

A sequence of numbers {a_n} has a recursive formula, where the initial term is 7 and each subsequent
number in the sequence can be found by adding the previous two terms. Given this information,
how many distinct elements are there to choose from if we want to write an expression for (n+1)
consecutive numbers in our given sequence?
Step 1: Understand the problem statement.

We have a recursive formula for {a_n} with initial term, 7 and each subsequent number is found by adding
the previous two terms. We are asked how many distinct elements there to choose from if we want to write an expression for (n+1) consecutive numbers in our given sequence.
Step 2: Analyze the problem mathematically.

To solve this kind of a problem, let us denote any term following both n and m as c. By definition, it is
true that these terms succeed each other. In fact,

c = b + k and f = e + j for some previous terms where they are in order.
Step 3: Write down the sequence explicitly.

a_n = a_(n-1) + a (n –2)

Let us then look at n+1 consecutive numbers starting from any integer term number. If we let these be k,
(k+k), and so on, for an initial value of k that fits our condition.
Step 4: Find the relationship between terms in sequence.

In general we see that it can easily follow:

a_ (n+k) = a_n + ak

But because this is the first time where I’m writing such code using recursive formulas,
I will use the Python programming language, one of which requires recursion.
Step 5: Test the python function on sample data.

Now we write our test case for values that return an integer answer. Our first sequence starts at
a_(n) = a_ (i+n), and then it’s obvious this formula is just like Pascal's Triangle with initial value,
for each n as such.

Here I provide some test cases:

    For i=1, n = 6:

Step 6: Write code that uses recursion.

We know the sequence follows pattern. However, here we do not need any input arguments in order to
calculate and define our answer by using a recursive formula based on initial term.

Here is python function definition.

def find_distinct_elements(n):
    if n == 1:
        return [7]
    else: # For case (n > 2) , use two initial values :7,8 to form first number in sequence.
         num_sequence=[7, 8] + [sum(num_seq[-3:]) for i in range(1,n)]

and also the generated title is completely unrelated saying "Computer virus removal"