Downloads · 30 days
17
8% of all-time downloads
SORNPov/Chamnaot2.5
Chamnaot2.5 is a machine learning model from SORNPov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model solves Khmer-language math word problems step by step.
Downloads · 30 days
17
8% of all-time downloads
All-time downloads
212
Public
Parameters
3.1B
6.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
This model solves Khmer-language math word problems step by step.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained(
"SORNPov/Chamnaot2.5",
dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("SORNPov/Chamnaot")
question = "សរសេរចំណោទនៅទីនេះ (your Khmer math question here)"
prompt = f"question: {question} guidance: "
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(
**inputs,
max_new_tokens=800,
do_sample=False,
pad_token_id=tokenizer.eos_token_id
)
input_len = inputs["input_ids"].shape[1]
print(tokenizer.decode(output[0][input_len:], skip_special_tokens=True))