q4f16_1 for
WebGPU (plus a Metal dylib for the fine-tuned variant). Each
subfolder is a self-contained MLC model — shards, tokenizer,
mlc-chat-config.json, and the compiled .wasm library — usable by
@mlc-ai/web-llm.google-it
and finetuned builds use the <|turn|> conv_template patch from
that PR; unsloth uses the original <start_of_turn> template.| Folder | Source | Status |
|---|---|---|
google-it/ | google/gemma-4-E2B-it | reference baseline |
unsloth/ | Unsloth-merged WAVE fine-tune | broken — pad-token failures downstream; kept for reproducibility |
finetuned/ | PEFT-merged WAVE fine-tune | working |
google-it/gemma-4-E2B-it-q4f16_1-webgpu.wasm.unsloth/bos_token_id: 1 and the original <start_of_turn> template); the
PEFT re-merge in finetuned/ resolves it. Kept here as a
reproducibility artifact only. WASM: wave-r32-q4f16_1-webgpu.wasm.finetuned/wave-r32-q4f16_1-webgpu.wasm. Also includes a
macOS Metal library: wave-r32-q4f16_1-metal.dylib.@mlc-ai/web-llm)1import { CreateMLCEngine } from "@mlc-ai/web-llm";
2
3const REPO = "https://huggingface.co/Maelstrome/wave-gemma4-E2B-q4f16_1-MLC/resolve/main";
4
5const engine = await CreateMLCEngine("wave-finetuned", {
6 appConfig: {
7 model_list: [{
8 model_id: "wave-finetuned",
9 model: `${REPO}/finetuned`,
10 model_lib: `${REPO}/finetuned/wave-r32-q4f16_1-webgpu.wasm`,
11 }],
12 },
13});@mlc-ai/web-llm@0.2.83. web-llm has a per-engine
state-leak; reload the engine per task call as a workaround.mlc-chat-config.json — MLC chat config (conv_template,
quantization, tokenizer ids, etc.)params_shard_*.bin — quantized weight shards (46 shards)tensor-cache.json — shard manifesttokenizer.json, tokenizer_config.json*-q4f16_1-webgpu.wasm — compiled MLC model library for WebGPUwave-r32-q4f16_1-metal.dylib (finetuned only) — compiled Metal
library for macOSq4f16_1 (group-quantized 4-bit weights, fp16 activations)