Downloads · 30 days
0
URajinda/my-gemma-2b-myanmar-v3-final-full
my-gemma-2b-myanmar-v3-final-full is a machine learning model from URajinda. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
ဤသည်မှာ Google/gemma-2b အခြေခံမော်ဒယ်ကို မြန်မာဘာသာစကားဖြင့် Instruction-Tuning (SFT) ထပ်မံပြုလုပ်ထားသော ဘာသာစကားမော်ဒယ် (LLM) ဖြစ်ပါသည်။ ၎င်းကို မြန်မာစာဖြင့် မေးခွန်းဖြေဆိုခြင်း (QA) နှင့် ညွှန်ကြားချက်များ လိုက်နာခ…
Downloads · 30 days
0
Access
Public
Updated Dec 13, 2025
Repo size
78.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors78.5 MB · 100%
From the Hugging Face model README
ဤသည်မှာ Google/gemma-2b အခြေခံမော်ဒယ်ကို မြန်မာဘာသာစကားဖြင့် Instruction-Tuning (SFT) ထပ်မံပြုလုပ်ထားသော ဘာသာစကားမော်ဒယ် (LLM) ဖြစ်ပါသည်။ ၎င်းကို မြန်မာစာဖြင့် မေးခွန်းဖြေဆိုခြင်း (QA) နှင့် ညွှန်ကြားချက်များ လိုက်နာခြင်း (Instruction Following) တို့အတွက် အနည်းငယ်သာ လေ့ကျင့်ထားပါသည်။
ဤမော်ဒယ်သည် စကားပြောဆိုမှု (Chat) ပုံစံဖြင့် လေ့ကျင့်ထားသောကြောင့်၊ User: နှင့် Assistant: tags များကို အသုံးပြုပြီး မေးမြန်းရပါမည်။
import torch
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
model_id = "URajinda/Qwen-1.5B-Burmese-SFT-v2"
# 1. Tokenizer နှင့် Model ကို load လုပ်ခြင်း
# Note: torch_dtype အစား dtype ကို သုံးပါ
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.float16,
device_map="auto"
)
# 2. Inference Pipeline ကို တည်ဆောက်ခြင်း
generator = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
device=model.device
)
# 3. မြန်မာဘာသာဖြင့် မေးမြန်းခြင်း (Instruction Format ကို သုံးပါ)
prompt = "User: မန္တလေးမြို့ရဲ့ အထင်ကရနေရာ သုံးခုကို ဖော်ပြပေးပါ။\nAssistant:"
output = generator(
prompt,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
eos_token_id=tokenizer.eos_token_id
)
print(output[0]['generated_text'])