-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Unexpected end of JSON input #1083
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
Comments
This is the limitation of the FastAPI. By default it expects, #1088 addresses. OpenAI support the |
Thanks so much for your quick patching. I will check-out your code changes and verify locally. |
@thiner , pass, |
I tested with the latest version |
@thiner do you know what the finish reason is? I believe grammar sampling should suppress the eos token but this may not be the case and it terminates before enclosing the end of the input. |
I don't know, I couldn't find any clue from the logs. It just didn't output the timing information, as I pasted at the beginning of this thread. |
Unfortunately, v0.2.38 encountered this problem again. I tried several mixtral models, all responses are interrupted after maybe 100~200 words. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Streaming output should work correctly.
Current Behavior
Streaming output is interrupted with below error message:
The same API is working properly with same request body if call with Postman, the only difference is header set to
Accept: application/json
in Postman.Environment and Context
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.
Running in Docker image, the image information:
nvidia/12.1.0-devel-ubuntu22.04
CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip3 install llama-cpp-python[server]
Failure Information (for bugs)
The Web UI shows error message:
Steps to Reproduce
Please provide detailed steps for reproducing the issue. We are not sitting in front of your screen, so the more detail the better.
Just call the
v1/chat/completions
API, and set the header valueAccept: text/event-stream
.Note: Many issues seem to be regarding functional or performance issues / differences with
llama.cpp
. In these cases we need to confirm that you're comparing against the version ofllama.cpp
that was built with your python package, and which parameters you're passing to the context.Try the following:
git clone https://github.com/abetlen/llama-cpp-python
cd llama-cpp-python
rm -rf _skbuild/
# delete any old buildspython -m pip install .
cd ./vendor/llama.cpp
cmake
llama.cpp./main
with the same arguments you previously passed to llama-cpp-python and see if you can reproduce the issue. If you can, log an issue with llama.cppFailure Logs
There is not any error message output by llama-cpp-python.
Please include any relevant log snippets or files. If it works under one configuration but not under another, please provide logs for both configurations and their corresponding outputs so it is easy to see where behavior changes.
Also, please try to avoid using screenshots if at all possible. Instead, copy/paste the console output and use Github's markdown to cleanly format your logs for easy readability.
The text was updated successfully, but these errors were encountered: