Instructions to use Maelstrome/wave-gemma4-E2B-q4f16_1-MLC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLC-LLM
How to use Maelstrome/wave-gemma4-E2B-q4f16_1-MLC with MLC-LLM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
wave-gemma4-E2B-q4f16_1-MLC
Three MLC-compiled Gemma 4 E2B variants, all quantized to 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.
Compiled against MLC PR
#3485. The google-it
and finetuned builds use the <|turn|> conv_template patch from
that PR; unsloth uses the original <start_of_turn> template.
Variants
| 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/
Google's Gemma 4 E2B (instruction-tuned), compiled as a baseline.
WASM: gemma-4-E2B-it-q4f16_1-webgpu.wasm.
unsloth/
Built from an Unsloth-merged Gemma 4 + WAVE LoRA. Downstream loaders
hit pad-token / tokenizer mismatches with this checkpoint (notice
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/
PEFT re-merge of the same WAVE LoRA. This is the variant you actually
want to use. WASM: wave-r32-q4f16_1-webgpu.wasm. Also includes a
macOS Metal library: wave-r32-q4f16_1-metal.dylib.
Usage (@mlc-ai/web-llm)
import { CreateMLCEngine } from "@mlc-ai/web-llm";
const REPO = "https://huggingface.co/Maelstrome/wave-gemma4-E2B-q4f16_1-MLC/resolve/main";
const engine = await CreateMLCEngine("wave-finetuned", {
appConfig: {
model_list: [{
model_id: "wave-finetuned",
model: `${REPO}/finetuned`,
model_lib: `${REPO}/finetuned/wave-r32-q4f16_1-webgpu.wasm`,
}],
},
});
Tested with @mlc-ai/web-llm@0.2.83. web-llm has a per-engine
state-leak; reload the engine per task call as a workaround.
Files per subfolder
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 macOS
Quantization
- Weights:
q4f16_1(group-quantized 4-bit weights, fp16 activations) - Context window: 131072 tokens
- Sliding window: 512
- Downloads last month
- -