gemma3-1b-translate — Thai → English

google/gemma-3-1b-it fully fine-tuned (all weights, no LoRA) on mekpro/translation_th_en for Thai→English translation of transcription-style text. Weights are stored in bfloat16.

How to prompt

Always use the chat template with this exact system prompt, and put the Thai text as the user message:

System: translate this transcription text into english language, only return result no explain

The model returns only the English translation, no explanations.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

repo = "mekpro/gemma3-1b-translate"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.bfloat16, device_map="auto")

messages = [
    {"role": "system", "content": "translate this transcription text into english language, only return result no explain"},
    {"role": "user", "content": "สวัสดีครับ วันนี้อากาศดีมาก"},
]
enc = tok.apply_chat_template(messages, add_generation_prompt=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**enc, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0][enc["input_ids"].shape[-1]:], skip_special_tokens=True))

Full-parameter fine-tune on a TPU v6e-1 (Google Colab), 1 epoch, bf16.

Downloads last month
-
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mekpro/gemma3-1b-translate

Finetuned
(570)
this model

Dataset used to train mekpro/gemma3-1b-translate