second-state / WasmEdge-WASINN-examples

Apache License 2.0
217 stars 35 forks source link

The read bytes are not valid UTF-8: Error { kind: InvalidData, message: "stream did not contain valid UTF-8" } #115

Open njalan opened 2 months ago

njalan commented 2 months ago

some time faced below issue: thread 'main' panicked at src/main.rs:579:14: The read bytes are not valid UTF-8: Error { kind: InvalidData, message: "stream did not contain valid UTF-8" } note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

below is my command: wasmedge --dir .:. --nn-preload default:GGML:CPU:MiniCPM-2B-dpo-q4km-gguf.gguf llama-chat.wasm -g 0

hydai commented 2 months ago

Please share the full reproduce steps.

njalan commented 2 months ago

@hydai When I ask in question in Chinese For example if I type 10 words in Chinese and then delete the last one word then wii get error message: thread 'main' panicked at src/main.rs:579:14: The read bytes are not valid UTF-8: Error { kind: InvalidData, message: "stream did not contain valid UTF-8" } note: run with RUST_BACKTRACE=1 environment variable to display a backtrace [2024-03-15 13:07:39.002] [error] execution failed: unreachable, Code: 0x89 [2024-03-15 13:07:39.003] [error] In instruction: unreachable (0x00) , Bytecode offset: 0x00079370 [2024-03-15 13:07:39.003] [error] When executing function name: "_start"

Below is my command: wasmedge --dir .:. --nn-preload default:GGML:CPU:MiniCPM-2B-dpo-q4km-gguf.gguf llama-chat.wasm -g 0