ngxson / wllama

WebAssembly binding for llama.cpp - Enabling in-browser LLM inference
https://huggingface.co/spaces/ngxson/wllama
MIT License
441 stars 21 forks source link

Feature request: diversify error mesages when loading a model fails #56

Open flatsiedatsie opened 6 months ago

flatsiedatsie commented 6 months ago

Currently a model can fail to load for a number of different reasons. However, the error raised seems to always be a general "failed to load" error. It would be useful if different errors could be raised for:

This is because in my project users can enter their own URL to a .gguf file (or provide a list of shards), so failure can come in many forms.

I can see in the debug console that the worker has precise information (e.g. GET failed), that that precision isn't passed on yet.

Screenshot 2024-05-24 at 12 50 43 Screenshot 2024-05-24 at 12 39 39
flatsiedatsie commented 6 months ago

Another exampleI just ran into while trying to load the new version of Phi 3 128K (Q2). I suspect this error is because of a Llama.cpp version mismatch?

Screenshot 2024-05-24 at 21 32 35