MLC-format weights and a precompiled WebGPU model library for openbmb/MiniCPM5-1B, targeting WebLLM v0.2.87 in the browser.
MiniCPM5-1B is a dense 1B model with a standard LlamaForCausalLM architecture
(24 layers, hidden 1536, 16 Q / 2 KV heads, explicit head_dim=128, bf16), so no
model-specific runtime code is required.
| File | Purpose |
|---|---|
mlc-chat-config.json |
MLC chat config (llama, q4f16_1, 4096 ctx, MiniCPM5 ChatML template) |
tensor-cache.json + params_shard_*.bin |
Quantized weights, 15 shards, 608 MB payload, 4.5 bits/param |
tokenizer.json, tokenizer_config.json |
Tokenizer (byte-level, vocab 130560) |
libs/MiniCPM5-1B-q4f16_1_cs1k-webgpu.wasm |
WebGPU model library (6.66 MB, md5 c188ffa267d9eee0dc366100ae9fc371) |
webllm-model-records.json |
Ready-to-use WebLLM model record |
import * as webllm from "@mlc-ai/web-llm"; // v0.2.87
const MODEL_ID = "MiniCPM5-1B-q4f16_1-MLC";
const appConfig = {
model_list: [
{
model: "https://huggingface.co/leventkoldas/MiniCPM5-1B-q4f16_1-MLC/resolve/main/",
model_id: MODEL_ID,
model_lib:
"https://huggingface.co/leventkoldas/MiniCPM5-1B-q4f16_1-MLC/resolve/main/libs/MiniCPM5-1B-q4f16_1_cs1k-webgpu.wasm",
vram_required_MB: 1500,
low_resource_required: true,
},
],
};
const engine = await webllm.CreateMLCEngine(MODEL_ID, { appConfig });
const reply = await engine.chat.completions.create({
messages: [{ role: "user", content: "Explain quantum computing in one sentence." }],
max_tokens: 128,
extra_body: { enable_thinking: true },
});
console.log(reply.choices[0].message.content);
WebLLM's chat API is stateless: send the full messages history on each request to
reuse the KV cache across turns.
q4f16_1 (group size 32, int4 weights, fp16 compute).<|im_start|>role\n…<|im_end|>\n; BOS token 0;
stop tokens 1 (</s>) and 130073 (<|im_end|>); no default system prompt;
historical <think> blocks stripped like the official template.extra_body.enable_thinking = false pre-fills
<think>\n\n</think>\n\n (the model's native no-think prompt). Leave it true
(or unset) to let the model reason.mlc-ai/mlc-llm@44fd06dmlc-ai/relax@629cc65 (tvm-tirx@198a0457, tvm-ffi@6628c46)Verified with Chrome for Testing 158 on an Intel Iris Xe (Vulkan): 84 * 3 / 2 → 60,
capital of France → Paris, thinking 17 + 25 → 42, ~39–52 decode tok/s.
params_shard_0.bin 100 MBparams_shard_1.bin 100 MBminicpm-webgpu/artifact/chunk-2d5ecbaf2e174d89a9796078f6beb8315819241f71a47eaabeb6abb9c5114cbf.bin 34 MBminicpm-webgpu/artifact/chunk-51189605678afe26b16f1d09b1693cce2a25db3a01aa8dc3068f05dea2c039e8.bin 34 MBminicpm-webgpu/artifact/chunk-53e38f00a1a5735120b9dc2f0233280596ab3d2da7717e9578babb139fa07929.bin 34 MBminicpm-webgpu/artifact/chunk-565adff82d70e11ee20f2c9539d988f079749847668f04b56fdd136cc965873a.bin 34 MBminicpm-webgpu/artifact/chunk-68755ad6028516242c7c7db1795698fc875a8513ce1f262fab2581e0ff22fd83.bin 34 MBminicpm-webgpu/artifact/chunk-6b5100368625814762d951d991acaf406b13b9e1aa0233a375ae0d503a7d95a1.bin 34 MBminicpm-webgpu/artifact/chunk-811117224ab733c95fafbb890a73fb76c1786f7ceb89aa8e8ce3571bdebbd5b4.bin 34 MBminicpm-webgpu/artifact/chunk-99ed7d2256a59d84d8ca16e893332b3cd1310dcc53232d9059ac05b916566e23.bin 34 MBminicpm-webgpu/artifact/chunk-9ae16d15c2b774ba13ce112f0225f9ac6dc82329d8da5a590e7530495e750505.bin 34 MBminicpm-webgpu/artifact/chunk-ad5232cdc76543c9c3d7f4a11c9306c7247ab1bc4d8c3c8a954967489bf6b592.bin 34 MBminicpm-webgpu/artifact/chunk-b5bb5c2259cfa30a5b10b0ff9c44bb2fb54307b84f9e5a7670c037093e7bbb37.bin 34 MBminicpm-webgpu/artifact/chunk-c6360e46186da03b4e90230f0ff3c4c20c538b34a0025c3a830510fbc3982422.bin 34 MBminicpm-webgpu/artifact/chunk-d49a933b5cd7767df31355ba9f64b0b17bdaa99bc1712109811c282c0a54bf74.bin 34 MBminicpm-webgpu/artifact/chunk-d88505d25653cb573d9ea2e183652f58ce02d0d08df3202be086a1fed3c140ed.bin 34 MBminicpm-webgpu/artifact/chunk-e31c927c4b534336cbd68f2b788f18761f319ccff9c9e31f63c206fded07feec.bin 34 MBminicpm-webgpu/artifact/chunk-e4efdd945bbcc6833fd57885a7235c0536a6befe03cb606fd1edf9356383f188.bin 34 MBminicpm-webgpu/artifact/chunk-e65a7fb544c5ea0948e874515a49cbc5d269fc3ba4281378d04928c3b69a90c3.bin 34 MBminicpm-webgpu/artifact/chunk-f5868aa5a470f46ae3dd7465949ed820311f7fb487bb5eac138eba4a19167eaf.bin 34 MBparams_shard_3.bin 33 MBparams_shard_4.bin 33 MBparams_shard_2.bin 32 MBparams_shard_10.bin 32 MBparams_shard_11.bin 32 MBparams_shard_12.bin 32 MBparams_shard_13.bin 32 MBparams_shard_6.bin 32 MBparams_shard_7.bin 32 MBparams_shard_8.bin 32 MBparams_shard_9.bin 32 MBparams_shard_5.bin 30 MBparams_shard_14.bin 24 MBminicpm-webgpu/artifact/tokenizer-d443a49b83a65c5a96c51ba442bc695e6777ecda85cba3d4865d1ae394f56c07.bin 10 MBminicpm-webgpu/artifact/chunk-d5d40ddfb819b4e50c3d6d854f1ca38b8b5c357bce18d6c5775e3b2f6c0b0b2e.bin 4 MBopenbmb/MiniCPM5-1B