Views
No views yet
google/gemma-4-E4B-it, produced with Heretic v1.3.0.transformers) and a GGUF f16 quantization for llama.cpp / Ollama.| Path | Format | Size | Use with |
|---|---|---|---|
model-*.safetensors (4 shards) | HF safetensors fp16 | ~15 GB | transformers, raw PyTorch, further conversion |
gemma-4-E4B-it-heretic-f16.gguf | GGUF fp16 | ~14 GB | llama.cpp, Ollama, LM Studio, Jan, KoboldCpp |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "lonelynode/gemma-4-E4B-it-heretic"
5tok = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.float16, device_map="auto")
7
8messages = [{"role": "user", "content": "Explain abliteration in one sentence."}]
9inputs = tok.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
10out = model.generate(inputs, max_new_tokens=256)
11print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))Modelfile pointing at the GGUF:FROM ./gemma-4-E4B-it-heretic-f16.gguf
TEMPLATE """{{- range $i, $_ := .Messages }}{{- $last := eq (len (slice $.Messages $i)) 1 -}}<start_of_turn>{{ if eq .Role "user" }}user{{- else }}model{{- end }}
{{ .Content }}<end_of_turn>
{{ if and $last (ne .Role "model") }}<start_of_turn>model
{{ end }}{{- end }}"""
PARAMETER stop "<start_of_turn>"
PARAMETER stop "<end_of_turn>"
PARAMETER num_ctx 81921ollama create gemma4-e4b-heretic -f Modelfile
2ollama run gemma4-e4b-hereticllama-quantize from llama.cpp:llama-quantize gemma-4-E4B-it-heretic-f16.gguf gemma-4-E4B-it-heretic-Q4_K_M.gguf Q4_K_M| Quant | Size | Quality |
|---|---|---|
| Q8_0 | ~7.6 GB | nearly identical to f16 |
| Q5_K_M | ~5.3 GB | very high |
| Q4_K_M | ~4.5 GB | high, recommended balance |
| Q3_K_M | ~3.5 GB | acceptable, smallest viable |
google/gemma-4-E4B-it and is released under the Gemma Terms of Use. By downloading or using this model, you agree to those terms.google/gemma-4-E4B-it