CambodiaTourismLM is a custom bilingual language model built completely from scratch, designed to understand and generate text related to Cambodian tourism, culture, geography, and history in both English and Khmer.
Instead of fine-tuning an existing foundation model, this model was trained from random initialization using a custom-built Byte-Level BPE tokenizer and a Llama-style causal language model architecture.
en, km)The model uses a scaled-down Llama configuration optimized for custom local training:
You can load this model directly using the Hugging Face transformers library:
from transformers import LlamaForCausalLM, PreTrainedTokenizerFast
from tokenizers import ByteLevelBPETokenizer
# Load tokenizer
tokenizer_path = "seyhachhorn/cambodia-tourism-lm" # Update with your repo id if needed
model = LlamaForCausalLM.from_pretrained("seyhachhorn/cambodia-tourism-lm")
input_text = "Angkor Wat is"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))