Gemma3-Singlish-Sinhala-CodeMix
130
license:apache-2.0
by
savinugunarathna
Language Model
OTHER
New
130 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Training Data Analysis
🟡 Average (4.3/10)
Researched training datasets used by Gemma3-Singlish-Sinhala-CodeMix with quality assessment
Specialized For
general
science
multilingual
reasoning
Training Datasets (3)
common crawl
🔴 2.5/10
general
science
Key Strengths
- •Scale and Accessibility: At 9.5+ petabytes, Common Crawl provides unprecedented scale for training d...
- •Diversity: The dataset captures billions of web pages across multiple domains and content types, ena...
- •Comprehensive Coverage: Despite limitations, Common Crawl attempts to represent the broader web acro...
Considerations
- •Biased Coverage: The crawling process prioritizes frequently linked domains, making content from dig...
- •Large-Scale Problematic Content: Contains significant amounts of hate speech, pornography, violent c...
wikipedia
🟡 5/10
science
multilingual
Key Strengths
- •High-Quality Content: Wikipedia articles are subject to community review, fact-checking, and citatio...
- •Multilingual Coverage: Available in 300+ languages, enabling training of models that understand and ...
- •Structured Knowledge: Articles follow consistent formatting with clear sections, allowing models to ...
Considerations
- •Language Inequality: Low-resource language editions have significantly lower quality, fewer articles...
- •Biased Coverage: Reflects biases in contributor demographics; topics related to Western culture and ...
arxiv
🟡 5.5/10
science
reasoning
Key Strengths
- •Scientific Authority: Peer-reviewed content from established repository
- •Domain-Specific: Specialized vocabulary and concepts
- •Mathematical Content: Includes complex equations and notation
Considerations
- •Specialized: Primarily technical and mathematical content
- •English-Heavy: Predominantly English-language papers
Explore our comprehensive training dataset analysis
View All DatasetsCode Examples
Usagepythontransformers
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
import warnings, os
warnings.filterwarnings("ignore")
MODEL_ID = "savinugunarathna/Gemma3-Singlish-Sinhala-CodeMix"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = "left"
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID, torch_dtype=torch.bfloat16,
trust_remote_code=True,
).to("cuda" if torch.cuda.is_available() else "cpu")
model.eval()
PROMPT = "Translate the following code-mixed text into pure Sinhala:\n{input}\nSinhala:"
gen_config = GenerationConfig(
max_new_tokens=256, num_beams=3, do_sample=False,
repetition_penalty=1.2, pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id, top_p=None, top_k=None,
)
def convert(text):
prompt = PROMPT.format(input=text)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=True).to(model.device)
in_len = inputs["input_ids"].shape[1]
with torch.no_grad():
out = model.generate(**inputs, generation_config=gen_config)
return tokenizer.decode(out[0, in_len:], skip_special_tokens=True).strip()
# Transliteration
print(convert("mama gedara yanawa"))
# Code-mix translation
print(convert("ara politician wa mama dannawa"))
print(convert("meka harima boring panthiyak"))
print(convert("oyage phone eka ko"))Citationbibtex
@misc{gunarathna2025codemix,
title={Gemma3-Singlish-Sinhala-CodeMix: Multi-Phase LoRA Fine-Tuning for Singlish-to-Sinhala Transliteration and Code-Mix Translation},
author={Gunarathna, Savinu},
year={2025},
url={https://huggingface.co/savinugunarathna/Gemma3-Singlish-Sinhala-CodeMix}
}Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.