Comments (8)
Hi @sohankunkerkar Thanks for your reporting; I just updated the LLM document. Please let me know if the latest link makes it work or not.
@hydai Yup, this looks good now. Thanks for the quick fix.
from wasmedge.
Hi @sohankunkerkar
Have you installed the ggml plugin?
Ref: https://wasmedge.org/docs/develop/rust/wasinn/llm_inference/#prerequisite
from wasmedge.
@hydai Yeah, it looks like I need to source the .bashrc before running that command.
BTW, do you happen to see this error before?
$ wasmedge --dir .:. --nn-preload default:GGML:AUTO:llama-2-7b-chat-q5_k_m.gguf llama-chat.wasm
[2024-02-02 14:50:09.897] [error] loading failed: magic header not detected, Code: 0x23
[2024-02-02 14:50:09.897] [error] Bytecode offset: 0x00000000
[2024-02-02 14:50:09.897] [error] At AST node: component
[2024-02-02 14:50:09.897] [error] File name: "/tmp/test/llama-chat.wasm"
from wasmedge.
$ wasmedge --dir .:. --nn-preload default:GGML:AUTO:llama-2-7b-chat-q5_k_m.gguf llama-chat.wasm [2024-02-02 14:50:09.897] [error] loading failed: magic header not detected, Code: 0x23 [2024-02-02 14:50:09.897] [error] Bytecode offset: 0x00000000 [2024-02-02 14:50:09.897] [error] At AST node: component [2024-02-02 14:50:09.897] [error] File name: "/tmp/test/llama-chat.wasm"
Could you check if the llama-chat.wasm
is downloaded completely? If the magic header is not detected, the wasm file itself may be broken.
from wasmedge.
Oh, I think I know the reason.
We don't ship the wasm inside the repo now; instead, we move the wasm files into the release assets: https://github.com/second-state/LlamaEdge/releases/tag/0.2.12
cc @alabulei1 The document is totally out of date. We no longer ship the WASM file from the above link: https://wasmedge.org/docs/develop/rust/wasinn/llm_inference/#quick-start
The llama-utils
is also renamed to llamaedge
. The page should be updated.
from wasmedge.
Ah, I see. I managed to get past that error. Now I'm seeing this error:
$wasmedge --dir .:. --nn-preload default:GGML:AUTO:llama-2-7b-chat-q5_k_m.gguf llama-chat.wasm
[INFO] Model alias: default
[INFO] Prompt context size: 512
[INFO] Number of tokens to predict: 1024
[INFO] Number of layers to run on the GPU: 100
[INFO] Batch size for prompt processing: 512
[INFO] Temperature for sampling: 0.8
[INFO] Top-p sampling (1.0 = disabled): 0.9
[INFO] Penalize repeat sequence of tokens: 1.1
[INFO] presence penalty (0.0 = disabled): 0
[INFO] frequency penalty (0.0 = disabled): 0
[INFO] Use default system prompt
[INFO] Prompt template: Llama2Chat
[INFO] Log prompts: false
[INFO] Log statistics: false
[INFO] Log all information: false
gguf_init_from_file: invalid magic characters '<!DO'
[2024-02-02 14:58:50.883] [error] [WASI-NN] GGML backend: Error: unable to init model.
Error: "Fail to load model into wasi-nn: Backend Error: WASI-NN Backend Error: Caller module passed an invalid argument"
from wasmedge.
I am sorry about that.
'<!DO'
shows it doesn't download the model correctly. And it seems like only grep an HTML file.
Please try curl -LO https://huggingface.co/wasmedge/llama2/resolve/main/llama-2-7b-chat-q5_k_m.gguf
to download the model again.
Cc @alabulei1, even the model link needs to be updated. Please check them at the same time.
from wasmedge.
Hi @sohankunkerkar
Thanks for your reporting; I just updated the LLM document. Please let me know if the latest link makes it work or not.
from wasmedge.
Related Issues (20)
- LFX Workspace: Fix bugs found by fuzzer [Term-3] HOT 8
- bug: failed to update metadata for enabling `translate` HOT 1
- [component model] host component has to expose type by name (and bind type by name)
- bug: failed stress test on macOS
- bug: metal backend of the stable diffusion plugin should be enabled by default on macOS arm64
- bug: Building from source throws expectedTest(SIGTRAP) error HOT 5
- question: Plugin circular dependencies make WasmEdge upgrades and releases complex. HOT 2
- feat: Add CANN support for WASI-NN ggml plugin
- [Roadmap] Q4 2024 Discussion HOT 1
- feat: Support `threads` of whisper.cpp HOT 2
- feat: Create a new repo for all Rust plugins HOT 6
- bug: WasmEdge v0.14.1 failed to generate embeddings from chunks
- 0.14.1 build failure on Debian (`error: call of overloaded βwrite<char>(fmt::v9::detail::default_arg_formatter`) HOT 3
- bug: failed to build Tests for WASI-NN Piper on Ubuntu 20.04
- feat: support `--lora-model-dir` of stable-diffusion.cpp in `wasmedge_stablediffusion` plugin HOT 2
- feat: `piper` and `chattts` plugins for the `Apple Silicon` platform HOT 3
- bug: `Segmentation fault` while running flux.1-dev with sd plugin HOT 1
- feat: Upgrade `wasmedge_stablediffusion` plugin to `sd.cpp (master-14206fd)`
- feat: Support the whisper plugin on GPU HOT 1
- WasmEdge Community meeting on 1st Oct
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasmedge.