Instructions to use stenml/BowLingual-12B-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stenml/BowLingual-12B-v1 with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("stenml/BowLingual-12B-v1") model = AutoModelForMultimodalLM.from_pretrained("stenml/BowLingual-12B-v1", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
BowLingual-12B-v1
BowLingual-12B-v1 is a fine-tuned version of google/gemma-4-12B-it, intended primarily for natural English-to-Thai conversational translation.
It targets informal messages such as LINE and Messenger chats, where literal textbook translation often sounds stiff or unnatural.
Intended use
- English-to-Thai conversational translation
- Informal, natural-sounding Thai messages
- Preserving tone, directness, and emotional intensity
- Prompt-driven translation pipelines
Usage
Install the dependencies:
pip install -U transformers torch accelerate
Example:
from transformers import AutoModelForMultimodalLM, AutoProcessor
model_id = "stenml/BowLingual-12B-v1"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForMultimodalLM.from_pretrained(
model_id,
dtype="auto",
device_map="auto",
)
messages = [
{
"role": "user",
"content": "Translate into natural casual Thai: I'm almost home.",
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
enable_thinking=False,
).to(model.device)
output = model.generate(**inputs, max_new_tokens=256)
generated = output[0][inputs["input_ids"].shape[-1]:]
print(processor.decode(generated, skip_special_tokens=True))
Default generation settings
- Temperature:
1.0 - Top-p:
0.95 - Top-k:
64
Translation applications may benefit from lower-temperature or deterministic decoding, depending on the prompt and desired amount of stylistic variation.
Files
model.safetensors: full model weightstokenizer.json: Gemma 4 tokenizertokenizer_config.json: tokenizer and response parsing metadatachat_template.jinja: canonical Gemma 4 chat templateprocessor_config.json: multimodal processor configuration
The Q4_K_M GGUF release is available at stenml/BowLingual-12B-v1-GGUF.
Evaluation
No formal benchmark results are currently published for this release. Test it against representative conversational messages before production use.
Limitations
- Primarily intended for English-to-Thai conversational translation
- May produce inaccurate, unnatural, or overly literal translations
- May hallucinate information absent from the source
- Not validated for legal, medical, financial, or safety-critical translation
- Multimodal behavior has not been formally evaluated after fine-tuning
- Training-data and hyperparameter details are not currently published
License
Apache License 2.0, following the Gemma 4 base model metadata.
- Downloads last month
- 112