Laphet: A lightweight toolkit for exploring neural network language models with Python. Ideal for educational purposes, it supports next-word prediction and evaluation using simplified implementations of MLP, Bi-LSTM, Transformer, BERT and GPT. The project takes its name from Laphet (Burmese: လက်ဖက်), the iconic fermented tea leaves of Myanmar, a personal favorite of the author.
- Myanmar name generation (with torch.nn.Embedding)
- Myanmar name generation (with fasttext, freeze)
- Myanmar name generation (with fasttext, no freeze)
- POS tag generation (with torch.nn.Embedding)
- POS tag generation (with fasttext, freeze)
- POS tag generation (with fasttext, no freeze)
Please note the different licenses applicable for the code, myRoman, and myPOS.
MIT License
https://github.com/ye-kyaw-thu/Laphet/blob/main/LICENSE
Apache License (Version 2.0)
https://github.com/ye-kyaw-thu/myRoman/blob/main/LICENSE
Creative Commons Attribution-NonCommercial-Share Alike 4.0 International (CC BY-NC-SA 4.0) License
Details of the License
If you have used the Laphet LM tool, please cite it as follows:
(Laphet ကို သုံးဖြစ်ကြရင် အောက်ပါ citation လုပ်ပေးပါ။ ကျေးဇူးပါ။)
@misc{laphet_2024,
author = {Ye Kyaw Thu},
title = {Laphet LM tool, Version 0.7},
month = {1},
year = {2025},
url = {https://github.com/ye-kyaw-thu/Laphet},
note = {Accessed: 2025-Jan-27},
institution = {LU Lab., Myanmar}
}
[1]. https://github.com/karpathy/nanoGPT
[2]. https://github.com/EurekaLabsAI/mlp
[3]. https://leimao.github.io/blog/Entropy-Perplexity/
[4]. https://github.com/Spico197/awesome-lm-evaluation
[5]. https://github.com/xbeat/Machine-Learning/blob/main/Physics%20of%20Language%20Models%20in%20Python.md