Views
No views yet
onnx/model_q4f16.onnx — 4-bit MatMuls + fp16 (888 MB), ~30 tok/s on WebGPU. Use dtype: "q4f16".1import { AutoTokenizer, AutoModelForCausalLM } from "@huggingface/transformers";
2const tokenizer = await AutoTokenizer.from_pretrained("skjortan/MiniCPM5-1B-ONNX");
3const model = await AutoModelForCausalLM.from_pretrained("skjortan/MiniCPM5-1B-ONNX",
4 { device: "webgpu", dtype: "q4f16" });optimum-cli export onnx --task text-generation-with-past, quantized with
onnxruntime MatMulNBitsQuantizer (block 32) and converted to fp16 after layernorm fusion.
Chat template (with enable_thinking switch and native XML tool calling) is inlined in
tokenizer_config.json. KV cache I/O is fp32 (transformers_js_config.kv_cache_dtype).