Skip to content
ModelVerifiedExternal
Download

Gemma 4 E4B It Merged

google/gemma-4-E4B-it with a LoRA adapter (q/k/v/o/gate/up/down on the language model, r=16, alpha=32) merged into the base weights. bf16.

KindOtherBase modelgoogle/gemma-4-E4B-itVersionRevision a18eadcPublisher@dxv2kCgrade

Model source

Kind
Other
File size
14.9 GB
Base model
google/gemma-4-E4B-it
Version
vRevision a18eadc
Updated
Oct 8, 2026
Publisher
@dxv2k
Downloads
5
Source
Hugging Face

Source description

gemma-4-E4B-it-merged

google/gemma-4-E4B-it with a LoRA adapter (q/k/v/o/gate/up/down on the language model, r=16, alpha=32) merged into the base weights. bf16.

Inference Endpoints

Ships a custom handler.py (Inference Toolkit) because the Gemma 4 arch is too new for the default container. requirements.txt pins transformers>=5.12.1. Deploy on a GPU instance with >=24 GB VRAM (model is ~16 GB bf16).

Request body:

{"inputs": "What is a LoRA adapter?", "parameters": {"max_new_tokens": 256}}

Local use

import torch
from transformers import AutoModelForImageTextToText, AutoProcessor

m = AutoModelForImageTextToText.from_pretrained(
    "dxv2k/gemma-4-E4B-it-merged", dtype=torch.bfloat16, device_map="auto")
p = AutoProcessor.from_pretrained("dxv2k/gemma-4-E4B-it-merged")
msgs = [{"role": "user", "content": [{"type": "text", "text": "Hello"}]}]
enc = p.apply_chat_template(msgs, add_generation_prompt=True, tokenize=True,
                            return_dict=True, return_tensors="pt").to(m.device)
out = m.generate(**enc, max_new_tokens=128)
print(p.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))

Sources

1 source
Hugging FacePrimaryVersion a18eadc5e99cdaeb8998162fdb0265eb9d4acf30
huggingface.co/dxv2k/gemma-4-E4B-it-merged/tree/a18eadc5e99cdaeb8998162fdb0265eb9d4acf30

Verified Sep 15

Model artifacts

1 artifact

model.safetensors

safetensors · 14.9 GB · SHA-256 b556ecb6cd7a…3879 · Hugging Face

Download

Source excerpts

3 excerpts

--- base_model: google/gemma-4-E4B-it library_name: transformers pipeline_tag: image-text-to-text license: gemma tags: - gemma4 - lora - merged - endpoints-template --- # gemma-4-E4B-it-merged `google/gemma-4-E4B-it` with a LoRA adapter (q/k/v/o/gate/up/down on the language model, r=16, alpha=32) merged into the base weights. bf16. ## Inference Endpoints Ships a custom `handler.py` (Inference Toolkit) because the Gemma 4 arch is too new for the default container. `requirements.txt` pins `transformers>=5.12.1`. Deploy on a GPU instance with **>=24 GB** VRAM (model is ~16 GB bf16). Request body: ```json {"inputs": "What is a LoRA adapter?", "parameters": {"max_new_tokens": 256}} ``` ## Local use ```python import torch from transformers import AutoModelForImageTextToText, AutoProcessor m = AutoModelForImageTextToText.from_pretrained( "dxv2k/gemma-4-E4B-it-merged", dtype=torch.bfloat16, device_map="auto") p = AutoProcessor.from_pretrained("dxv2k/gemma-4-E4B-it-merged") msgs = [{"role": "user", "content": [{"type": "text", "text": "Hello"}]}] enc = p.apply_chat_template(msgs, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(m.device) out = m.generate(**enc, max_new_tokens=128) print(p.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True)) ```

Source context: 5 downloads · 0 likes · Pipeline image-text-to-text · Library transformers · Repo dxv2k/gemma-4-E4B-it-merged

Source context: 77 downloads · 0 likes · Pipeline image-text-to-text · Library transformers · Repo dxv2k/gemma-4-E4B-it-merged