WebLLM / MLC LLM build (q4f16_1) for running MiniCPM5-2B in the browser

#2
by ozhyhinas - opened

There is now a WebLLM / MLC LLM build of MiniCPM5-2B for running the model in the browser on WebGPU:

https://huggingface.co/ozhyhinas/MiniCPM5-2B-q4f16_1-MLC

  • q4f16_1 weights (42 shards, 1.42 GB, 4.5 bits per parameter) converted with mlc_llm convert_weight
  • WebGPU model library compiled against the mlc-llm/TVM pair that WebLLM 0.2.84 ships, so it loads with the current @mlc-ai/web-llm npm package as a custom appConfig entry (snippet on the model card)
  • ChatML conversation template with this model's stop tokens (</s>, <|im_end|>); enable_thinking: false in WebLLM produces the empty <think>\n\n</think> prefix from chat_template.jinja, so non-thinking mode works as in the reference implementation
  • SHA-256 manifest for every file and the exact build recipe on the card; Apache 2.0 as the base model

Tested in Chrome on Apple Silicon: cold load about 25 s, 17 to 29 tokens/s decode at 4-bit. A pull request adding the record to WebLLM's prebuilt model list is open at https://github.com/mlc-ai/web-llm/pull/855.

If you would like to link it from the README alongside the GGUF and MLX conversions, or host a copy under the openbmb namespace, happy to help with either.

Thanks for doing this, and for documenting the build recipe and SHA-256 manifest so carefully β€” that's genuinely useful for anyone who wants to run the model in the browser.
We're keeping the model card's links limited for now, so we won't be adding it there. Leaving this discussion open, though, so people looking for a WebGPU build can find it. Nice work.

Sign up or log in to comment