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

Sometimes crashes with UTF8 error #22

Open
kimtore opened this issue Nov 7, 2023 · 3 comments
Open

Sometimes crashes with UTF8 error #22

kimtore opened this issue Nov 7, 2023 · 3 comments

Comments

@kimtore
Copy link

kimtore commented Nov 7, 2023

Some prompts fail with:

thread 'main' panicked at 'called Result::unwrap() on an Err value: Utf8Error { valid_up_to: 0, error_len: None }', /home/kimt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/llama_cpp_rs-0.3.0/src/lib.rs:528:46

I'm using this model: https://huggingface.co/TheBloke/Luna-AI-Llama2-Uncensored-GGUF

Anything I can do to try to fix this problem?

@markcda
Copy link
Contributor

markcda commented Nov 9, 2023

Yes, see this commit in fork.

@kimtore
Copy link
Author

kimtore commented Nov 10, 2023

@markcda thanks for the workaround. Are some words now going to be dropped from the model's outputif they contain illegal UTF-8 characters?

@markcda
Copy link
Contributor

markcda commented Nov 11, 2023

Are some words now going to be dropped from the model's outputif they contain illegal UTF-8 characters?

The above commit only made specific deployment of the bug. Roughly speaking, the response will be reset if it contains at least one incorrect character. But the application will not crash. To solve your specific problem, I advise you to read the following post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants