ngxson / wllama

WebAssembly binding for llama.cpp - Enabling in-browser LLM inference

Home Page:https://ngxson.github.io/wllama/examples/basic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when loading a model via relative path

felladrin opened this issue · comments

Screenshot 2024-06-05 at 00 13 20

Originally posted by @flatsiedatsie in #61 (comment)


It seems wllama will always fail to load models via relative path due to this line:

task.blob = await GGUFRemoteBlob.create(new URL(task.url), {

For example:

new URL("/models/mermaid/Mermaid-Llama-3-3B-Pruned.04_K_M-00001-of-00008-gguf")

image

Yes this is because I leave this code as-is when I copied WebBlob implementation from huggingface.js.

I think we can get rid of URL and simply use string here. I can assign this issue to you if you want. What do you think @felladrin ?

Oh yeah, I can remove the URL, test it, and then create a pull request. You may assign it to me.

Whoop! Time for a new version release? I was implementing the simpler approach this enabled today, but had forgotten that it wasn't in the release yet. Loving it though, it makes me code a lot simpler.