Gemma 4 E4B Aggressive โ€” browser ONNX q4f16

This is a text-only, browser-oriented ONNX conversion of the HauhauCS Aggressive Q4_K_M GGUF. The GGUF tensors were dequantized and requantized to ONNX Runtime Web's q4f16 format. The ONNX computation graphs, tokenizer, and configuration are from onnx-community/gemma-4-E4B-it-ONNX, revision 2b6d2e26a962f70a33da8f7cd81e1afdd8d9cfb2. The original GGUF SHA-256 is d0027dd3a9128d9323e9f282c8bf010a8526c46477584535991dc1a869b56e96. The conversion script is included in this model repository.

This conversion is not bit-identical to Q4_K_M. It adds another lossy quantization step. Only text generation has been tested; the vision and audio encoders are not included. The original model's behavior and quality have not been independently evaluated.

import { AutoTokenizer, Gemma4ForCausalLM } from '@huggingface/transformers';
const id = 'Sido/hina-gemma4-e4b-aggressive-onnx';
const tokenizer = await AutoTokenizer.from_pretrained(id);
const model = await Gemma4ForCausalLM.from_pretrained(id, { dtype: 'q4f16', device: 'webgpu' });
const prompt = tokenizer.apply_chat_template(
  [{role: 'user', content: 'ใ“ใ‚“ใซใกใฏ'}],
  {tokenize: false, add_generation_prompt: true, enable_thinking: false},
);
const inputs = tokenizer(prompt, {add_special_tokens: false});
const output = await model.generate({...inputs, max_new_tokens: 64, do_sample: false});
console.log(tokenizer.batch_decode(output.slice(null, [inputs.input_ids.dims.at(-1), null]), {skip_special_tokens: true})[0]);

Gemma's model terms and the original model's terms apply to this derivative.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Sido/hina-gemma4-e4b-aggressive-onnx

Quantized
(3)
this model