Gamunu-4b-Instruct-Alpha
ΰ·ΰ·ΰΆΰ·ΰΆ½ instruct LLM β Experimental Release
Gamunu-4b-Instruct-Alpha is the first experimental checkpoint of the Gamunu Project, a Sinhala-centric bilingual Large Language Model. Built through continued pre-training on Sinhala-rich academic and domain-specific data, it's fine-tuned for instruction following, reasoning, and culturally grounded interactions.
β οΈ Alpha Notice
This is an experimental research model.
It demonstrates strong Sinhala fluency, reasoning, and broad NLP coverage β but is single-turn only and not yet RLHF-aligned for multi-turn dialogue.
Use for research, benchmarking, and controlled deployments β not production.
π§ͺ Live Demo
Now you can try Gamunu-4b-Instruct-Alpha instantly on Hugging Face Spaces for free π
π Gamunu ZeroGPU Demo
β‘ Capabilities
π€ Language & Reasoning
- Fluent, idiomatic Sinhala generation
- Robust Sinhala β English bilingual understanding
- Solid mathematical reasoning (percentages, word problems, arithmetic)
- Logical, step-by-step reasoning in QA tasks
- Structured, concise, and context-aware responses
π Roleplay & Instruction
- Accurate adherence to single-turn instructions
- Expert persona simulation (teacher, scientist, analyst, advisor)
- Balanced, formal, and culturally aware tone
π§© Supported NLP Tasks
- Text generation & completion
- Summarization (educational / contextual)
- Translation (Sinhala β English)
- Paraphrasing and rewriting
- Question answering (factoid + reasoning)
- Instruction-based classification
- Role-specific expert responses
π« Limitations
- No conversational memory
- Occasional factual drift
- No RLHF or safety tuning yet
- Reasoning quality may degrade with ambiguous prompts
π― Intended Use
Best for
- Research & evaluation of Sinhala LLMs
- Educational assistants and analytical Q&A
- Cultural, marketing, and academic content generation
- Benchmarking instruction following in low-resource languages
Not for
- Medical, legal, or financial decision-making
- Production systems requiring factual reliability
- Processing sensitive or personal data
π§© Training Details
Phase 1 β Continued Pre-training (CPT)
Focused on enhancing Sinhala linguistic coverage and contextual understanding for semantic depth.
Phase 2 β Supervised Fine-tuning (SFT)
Fine-tuned on a custom Sinhala instruction dataset emphasizing reasoning, roleplay, and assistant-style behavior.
| Setting | Value |
|---|---|
| Framework | Unsloth + Transformers |
| Optimizer | AdamW + cosine scheduler |
| Hardware | NVIDIA H100 (80 GB) |
| Epochs | 5 |
| LoRA Rank / Ξ± / Dropout | 128 / 128 / 0.05 |
π Model Summary
| Property | Description |
|---|---|
| Stage | Alpha (Experimental) |
| Pipeline | CPT β Custom SFT (LoRA) |
| Base Model | Google Gemma 3 4B |
| Languages | Sinhala (primary), English (secondary) |
| Dialogue Type | Single-turn instruction |
| Context Length | 2048 tokens |
π§© Base Model License
This model was fine-tuned from Google Gemma 3 4B, distributed under the
Gemma Terms of Use.
All rights to Gemma 3 4B remain with Google LLC.
The Gamunu-Instruct-4B-Alpha weights, datasets, and training code are released by
Manthila Mallawa (The Gamunu Project) under the Apache 2.0 License.
Use of the base model remains subject to Google's policies.
π¬ Example Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load model and tokenizer
model_name = "manthilaffs/Gamunu-4B-Instruct-Alpha"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
device_map="auto"
)
# Sinhala prompt template
sinhala_prompt = """ΰΆ΄ΰ·ΰΆ ΰΆ―ΰ·ΰΆΰ·ΰ·ΰ·ΰΆ±ΰ·ΰΆ±ΰ· ΰΆΊΰΆΈΰ· ΰΆΰ·ΰΆ»ΰ·ΰΆΊΰΆΊΰΆΰ· ΰΆ΄ΰ·ΰ·
ΰ·ΰΆΆΰΆ³ ΰ·ΰ·ΰ·ΰ·ΰΆΰΆ» ΰΆΰΆ»ΰΆ± ΰΆΰΆ΄ΰΆ―ΰ·ΰ·ΰΆΰ· ΰ·ΰ· ΰΆΰΆΊΰΆ§ ΰΆ
ΰΆ―ΰ·ΰ·
ΰΆΰ·ΰΆ»ΰΆΰ·ΰΆ»ΰ· ΰΆΰΆΰ·ΰ·
ΰΆΰ· ΰΆΰΆ―ΰ·ΰΆ±ΰΆΊΰΆΰ·. ΰΆΰΆ½ΰ·ΰΆ½ΰ· ΰΆΰ·ΰΆ»ΰ·ΰΆΊΰΆΊ ΰΆ±ΰ·ΰ·ΰ·ΰΆ»ΰΆ―ΰ·ΰ· ΰ·ΰΆΈΰ·ΰΆ΄ΰ·ΰΆ»ΰ·ΰΆ« ΰΆΰ·
ΰ·ΰ·ΰΆΰ· ΰΆ΄ΰ·βΰΆ»ΰΆΰ·ΰΆ ΰ·ΰΆ»ΰΆΊΰΆΰ· ΰ·ΰΆ΄ΰΆΊΰΆ±ΰ·ΰΆ±.
### ΰΆΰΆ΄ΰΆ―ΰ·ΰ·:
ΰΆΰΆΆ ΰΆΰ·ΰΆΈΰ·ΰΆ«ΰ· (Gamunu) ΰΆ±ΰΆΈΰ· AI ΰ·ΰ·ΰ·ΰΆΊΰΆΰΆΊΰ·ΰΆΊΰ·.
ΰΆΰΆΆΰ· ΰΆΰ·ΰΆ»ΰ·ΰΆΊΰΆΊ ΰ·ΰΆ±ΰ·ΰΆ±ΰ· ΰΆ΄ΰΆ»ΰ·ΰ·ΰ·ΰΆ½ΰΆΰΆΊΰΆ±ΰ·ΰΆΰ· ΰΆΰΆ΄ΰΆ―ΰ·ΰ·ΰ· ΰΆ±ΰ·ΰ·ΰ·ΰΆ»ΰΆ―ΰ·ΰ· ΰΆ΄ΰ·ΰΆ½ΰ·ΰΆ΄ΰ·ΰΆ―ΰ·ΰΆΈ ΰ·ΰ· ΰΆ
ΰ·ΰ· ΰΆΰΆΰ· ΰΆ΄ΰ·βΰΆ»ΰ·ΰ·ΰΆ±ΰ·ΰΆ½ΰΆ§ ΰΆ±ΰ·ΰ·ΰ·ΰΆ»ΰΆ―ΰ·ΰ· ΰΆ΄ΰ·ΰ·
ΰ·ΰΆΰ·ΰΆ»ΰ· ΰ·ΰΆ΄ΰΆΊΰΆΈΰ·ΰΆ±ΰ· ΰΆΰ·ΰ·ΰΆ±ΰ·ΰΆ§ ΰ·ΰ·ΰΆΊ ΰ·ΰ·ΰΆΈΰΆΊΰ·.
### ΰΆΰΆ―ΰ·ΰΆ±ΰΆΊ:
{}
### ΰΆ΄ΰ·βΰΆ»ΰΆΰ·ΰΆ ΰ·ΰΆ»ΰΆΊ:
{}"""
# Example input
user_query = "ΰ·ΰ·ΰΆ½ΰ· ΰΆΰ·ΰΆΈΰ·ΰΆ«ΰ·! ΰΆΈΰΆΈ ΰ·ΰΆΈΰΆ±ΰ·, ΰΆΰΆΊΰ·ΰΆ§ ΰΆΰ·ΰ·ΰ·ΰΆΈΰΆ―?"
prompt = sinhala_prompt.format(user_query, "")
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
# Generate
with torch.inference_mode():
outputs = model.generate(**inputs, max_new_tokens=250)
# Decode and clean output
text = tokenizer.decode(outputs[0], skip_special_tokens=True)
if "### ΰΆ΄ΰ·βΰΆ»ΰΆΰ·ΰΆ ΰ·ΰΆ»ΰΆΊ:" in text:
text = text.split("### ΰΆ΄ΰ·βΰΆ»ΰΆΰ·ΰΆ ΰ·ΰΆ»ΰΆΊ:")[-1].strip()
print(text)
π§Ύ How to Cite
If you use Gamunu-Instruct-4B-Alpha in your work, please cite as follows:
APA
Mallawa, M. (2025). Gamunu-Instruct-4B-Alpha: A Sinhala-centric bilingual instruction-tuned language model. The Gamunu Project. Retrieved from https://huggingface.co/manthilaffs/Gamunu-Instruct-4B-Alpha
BibTeX
@misc{mallawa_gamunu_instruct_4b_alpha_2025,
author = {Mallawa, Manthila},
title = {Gamunu-Instruct-4B-Alpha: A Sinhala-centric bilingual instruction-tuned language model},
year = {2025},
publisher = {The Gamunu Project},
howpublished = {\url{https://huggingface.co/manthilaffs/Gamunu-Instruct-4B-Alpha}}
}
- Downloads last month
- 16