Downloads · 30 days
891
5% of all-time downloads
INSAIT-Institute/MamayLM-Gemma-3-12B-IT-v2.0
MamayLM-Gemma-3-12B-IT-v2.0 is a image-text-to-text model from INSAIT-Institute. 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 gemma.
MamayLM v2.0 is a series of Ukrainian-adapted LLMs based on Gemma 3, developed by INSAIT. Available in 12B and 27B sizes. The successor to MamayLM-Gemma-3-12B-IT-v1.0.
Downloads · 30 days
891
5% of all-time downloads
All-time downloads
17.3K
Public
Parameters
12.2B
48.8 GB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors24.4 GB · 100%
From the Hugging Face model README
MamayLM v2.0 is a series of Ukrainian-adapted LLMs based on Gemma 3, developed by INSAIT. Available in 12B and 27B sizes. The successor to MamayLM-Gemma-3-12B-IT-v1.0.
Blog post: MamayLM v2.0 Release
Figure 1: Overall performance on English and Ukrainian benchmarks.
from transformers import AutoProcessor, Gemma3ForConditionalGeneration
import torch
model_id = "INSAIT-Institute/MamayLM-Gemma-3-12B-IT-v2.0"
processor = AutoProcessor.from_pretrained(model_id)
model = Gemma3ForConditionalGeneration.from_pretrained(
model_id, device_map="auto"
).eval()
messages = [
{
"role": "user",
"content": [{"type": "text", "text": "Коли був заснований Київський університет?"}],
},
]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)
input_len = inputs["input_ids"].shape[-1]
with torch.inference_mode():
generation = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.2)
generation = generation[0][input_len:]
print(processor.decode(generation, skip_special_tokens=True))
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/bee.jpg"},
{"type": "text", "text": "Опиши, що ти бачиш на зображенні."},
],
},
]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt"
).to(model.device, dtype=torch.bfloat16)
input_len = inputs["input_ids"].shape[-1]
with torch.inference_mode():
generation = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.2)
generation = generation[0][input_len:]
print(processor.decode(generation, skip_special_tokens=True))
from vllm import LLM, SamplingParams
llm = LLM(model="INSAIT-Institute/MamayLM-Gemma-3-12B-IT-v2.0")
params = SamplingParams(max_tokens=512, temperature=0.2)
messages = [
{
"role": "user",
"content": [{"type": "text", "text": "Коли був заснований Київський університет?"}],
},
]
outputs = llm.chat(messages, sampling_params=params)
print(outputs[0].outputs[0].text)
Serving with the OpenAI-compatible API:
vllm serve INSAIT-Institute/MamayLM-Gemma-3-12B-IT-v2.0
Do not use vLLM's on-the-fly quantization="fp8" flag with this base model — it silently quantizes the vision tower and multi-modal projector, producing garbage outputs on image inputs.
MamayLM-Gemma-3-12B-IT-v2.0 is distributed under the Gemma Terms of Use.