Instructions to use Sido/hina-gemma4-e4b-aggressive-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Sido/hina-gemma4-e4b-aggressive-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'Sido/hina-gemma4-e4b-aggressive-onnx');
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
- -