mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-15 03:24:48 -05:00
Webui ONLY triggers " I am programmed to follow ethical guidelines and ensure user safety. " where CLI interface does not #241
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @level1wendell on GitHub (Jan 30, 2024).
Bug Report
Description
Bug Summary:
For some reason the webui is triggering excessive "As a large language model" and "that is not ethical" outputs even for simple prompts, and this does not occur when using ollama from the CLI.
Steps to Reproduce:
It seems pretty reproducible -- download the codellama 70b parameter model (the one meta just dropped) and try to run it through ollama web ui
it works fine via ollama cli! But not via the web ui.
Expected Behavior:
The cli and the webui should work pretty consistently.
Actual Behavior:
for the prompt:
please write a four function javascript calculator designed to be run in a web browser
The webui outputs:
.. which is both absurd and unhelpful. However the CLI outputs:
which is a reasonable attempt. It pretty consistently does NOT work via webui and DOES work via cli for the exact same prompt.
Environment
I am using Ubuntu 22.04 LTS with Cuda 12.1 / NVDIA RTX A6000. Fresh install.
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
Docker Container Logs:
Screenshots (if applicable):
Installation Method
docker installed web ui, locally running ollama
Additional Information
the webui picked up the already-installed-via-cli model, it was big, so I dont think it can possibly be two instances of ollama or anything like that.
happy to provide more info! I thought maybe the webui is pre-including some prompt text that is triggering this, but that seemed not to be the case.
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@tjbck commented on GitHub (Jan 30, 2024):
Hi, It's unlikely the issue is caused by the webui as it uses Ollama
/api/chatAPI route directly to communicate with ollama and doesn't modify anything. Could you try testing the model using/api/chatroute and see if you can reproduce the issue? Keep us updated, Thanks!@level1wendell commented on GitHub (Jan 30, 2024):
You may be right; I deleted the docker container and re-created it and it appears to be functioning normally now. I had not used docker inspect or modified the container in any way from the earlier test.
for the replacement container I re-ran the same docker command and even setup a new local storage volume. Perhaps something bad persisted in the original volume? I will do some additional testing but so far the webui and cli are more consistent now.
I will test more tomorrow and report back. Wonder if it is possibly browser or character set based.
EDIT:
Oh, I was able to trigger it again. AFTER it auto completed the title of the prompt, the title of that prompt became:
Caution: This prompt contains potentially harmful content. As a responsible AI
and now the webui is not as helpful anymore.
@justinh-rahb commented on GitHub (Jan 30, 2024):
Howdy @level1wendell glad to hear it's working now. Just finished downloading it myself and ran the same query you did and got a useful result. Sure isn't fast even on an M2 Max 96GB, 8tok/s. What speed are you getting by chance on that setup?
EDIT: Nvm, still having issues. Are you able to rule out anything from the browser session persisting this behavior by running incognito or with some other browser?
@level1wendell commented on GitHub (Jan 30, 2024):
On this single ADA A6000 it only took ~1 minute to output the entire 9kb javascript/html program. That's 10-20 tokens/sec? (does it show in the UI here somewhere or do you just take the output size over the timer from the ollama log?)
It might be the auto-header causing the model to go into unhelpful mode, check it out, another instance where it won't auto create a summary header:
This is on a different browser/machine too; I will have to check the original browser. It is happening "less" in the main prompt response area, just the auto-header area. Chrome in both cases, but different users/profiles between the two machines.
@justinh-rahb commented on GitHub (Jan 30, 2024):
You wouldn't expect a coding model to use so many emojii either 🤔. I've been trying to get my instance to spit out anything similar and so far nothing. I had one chat with Mixtral a few days ago that prefaced itself with an "..as an artificial intelligence.." that I wasn't expecting since I've gotten so used to not seeing them, but in the model's defence it was a bit of a sensitive topic, and it did answer the question.
@level1wendell commented on GitHub (Jan 30, 2024):
I had been using the model from the cli pretty extensively before deciding to try the web ui; not once did the cli interface trigger any similar kind of response, fwiw.
here's a fresh run with useful output:
{"model":"codellama:70b","created_at":"2024-01-30T05:08:56.920162213Z","message":{"role":"assistant","content":""},"done":true,"total_duration":82033494841,"load_duration":352363,"prompt_eval_count":39,"prompt_eval_duration":600218000,"eval_count":1235,"eval_duration":81432331000}
thats the last console message -- isn't it eval_count / eval_duration for tokens per large number of nanoseconds? wall clock time on this lengthy response was about a minute or so.
@tjbck commented on GitHub (Jan 30, 2024):
https://x.com/MrCatid/status/1752101682886988118?s=20
Seem like it could be a model issue :/
@tjbck commented on GitHub (Jan 30, 2024):
@level1wendell Were you able to test out the model using the api route?
@level1wendell commented on GitHub (Jan 30, 2024):
using this kind of approach
curl http://localhost:11434/api/generate -d '{
"model": "codingllama:70b",
"prompt": "please generate a four function calculator"
}'
didn't seem to trigger it but I only tested that a couple of times.
@justinh-rahb commented on GitHub (Jan 30, 2024):
I'm not so certain @tjbck, one of the examples given for something it wouldn't do was "write code to calculate aldrin cycler orbits for a hypothetical mars colonization mission", which I can get it to do without issue:
@yuliyantsvetkov commented on GitHub (Jan 30, 2024):
This is model issue. There is a sub on Reddit and X that the 70b is base model which is not fine tuned yet.
@tjbck commented on GitHub (Jan 30, 2024):
You might want to test with the
/api/chatroute, I believe their behaviours slightly differ from one another.I'll move this post to discussion for now as there isn't anything webui is doing in particular and it's only interacting with
/api/chatroute provided by ollama, so most likely the model is the culprit here. Keep us updated, Thanks!