Skip to content

Laphet: A tiny neural network language modeling library designed for students and educators.

License

Notifications You must be signed in to change notification settings

ye-kyaw-thu/Laphet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laphet (လက်ဖက်)

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.

Example Notebooks

Version 0.7

  1. Myanmar name generation (with torch.nn.Embedding)
  2. Myanmar name generation (with fasttext, freeze)
  3. Myanmar name generation (with fasttext, no freeze)
  4. POS tag generation (with torch.nn.Embedding)
  5. POS tag generation (with fasttext, freeze)
  6. POS tag generation (with fasttext, no freeze)

License

Please note the different licenses applicable for the code, myRoman, and myPOS.

For code

MIT License
https://github.com/ye-kyaw-thu/Laphet/blob/main/LICENSE

For myRoman Data

Apache License (Version 2.0)
https://github.com/ye-kyaw-thu/myRoman/blob/main/LICENSE

For myPOS Data

Creative Commons Attribution-NonCommercial-Share Alike 4.0 International (CC BY-NC-SA 4.0) License
Details of the License

Citation

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}
}

References

[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

About

Laphet: A tiny neural network language modeling library designed for students and educators.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published