Downloads · 30 days
14
3% of all-time downloads
FlameF0X/gemma-4-E2B-it-pruned
gemma-4-E2B-it-pruned is a image-text-to-text model from FlameF0X. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
14
3% of all-time downloads
All-time downloads
415
Public
Parameters
2.1B
4.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors4.1 GB · 99%
From the Hugging Face model README
from transformers import AutoProcessor, AutoModelForCausalLM
MODEL_ID = "FlameF0X/gemma-4-E2B-it-pruned"
# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto"
)
# Prompt
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a short joke about saving RAM."},
]
# Process input
text = processor.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False
)
inputs = processor(text=text, return_tensors="pt").to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
# Parse output
processor.parse_response(response)