How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="toandev/donglao-gemma-3-4b-it-vi")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("toandev/donglao-gemma-3-4b-it-vi")
model = AutoModelForMultimodalLM.from_pretrained("toandev/donglao-gemma-3-4b-it-vi")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

DongLao Gemma 3 4B IT Vietnamese

This model is a fine-tuned version of Google's Gemma 3 4B Instruct model, specifically optimized for Vietnamese language tasks. The model has been trained on the 5CD-AI/Viet-ShareGPT-4o-Text-VQA dataset, which provides high-quality Vietnamese text and visual question answering capabilities.

Key Features

  • Based on Gemma 3 4B Instruct architecture
  • Fine-tuned for Vietnamese language understanding and generation
  • Supports various Vietnamese NLP tasks including text generation, question answering, and conversation

image/png

Downloads last month
7
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
Input a message to start chatting with toandev/donglao-gemma-3-4b-it-vi.

Model tree for toandev/donglao-gemma-3-4b-it-vi

Finetuned
(728)
this model

Dataset used to train toandev/donglao-gemma-3-4b-it-vi