web-llm icon indicating copy to clipboard operation
web-llm copied to clipboard

Support a text embedding model

Open rudrOwO opened this issue 6 months ago • 2 comments

Requesting addition of nomic-embed-text embedding model for building a RAG app.

Also, if built-in embedding models are already available, please instruct me on how to use them.

TIA and awesome project btw :)

rudrOwO avatar Jun 25 '25 06:06 rudrOwO

Hi, thanks for your interest! You can check out this example for how to use RAG w/ WebLLM: https://github.com/mlc-ai/web-llm/tree/main/examples/embeddings

We support snowflake-arctic-embed as of now

CharlieFRuan avatar Jul 15 '25 04:07 CharlieFRuan

MLC/WebLLM’s BYOML flow only supports decoder chat LLMs. There’s no config/template to turn an embedding encoder (like MiniLM) into an MLC WebLLM model, so gen_config fails and I can’t produce a usable .wasm for embeddings.

python -m mlc_llm gen_config "$ModelHF" --quantization q0f32 -o "$OutBase" ----- Error ----- the following arguments are required: --conv-template

Is it possible or will be to do this? Thanks.

RichardH95 avatar Oct 25 '25 21:10 RichardH95