English

HITgram: A Platform for Experimenting with n-gram Language Models

Computation and Language 2024-12-17 v1 Artificial Intelligence

Abstract

Large language models (LLMs) are powerful but resource intensive, limiting accessibility. HITgram addresses this gap by offering a lightweight platform for n-gram model experimentation, ideal for resource-constrained environments. It supports unigrams to 4-grams and incorporates features like context sensitive weighting, Laplace smoothing, and dynamic corpus management to e-hance prediction accuracy, even for unseen word sequences. Experiments demonstrate HITgram's efficiency, achieving 50,000 tokens/second and generating 2-grams from a 320MB corpus in 62 seconds. HITgram scales efficiently, constructing 4-grams from a 1GB file in under 298 seconds on an 8 GB RAM system. Planned enhancements include multilingual support, advanced smoothing, parallel processing, and model saving, further broadening its utility.

Keywords

Cite

@article{arxiv.2412.10717,
  title  = {HITgram: A Platform for Experimenting with n-gram Language Models},
  author = {Shibaranjani Dasgupta and Chandan Maity and Somdip Mukherjee and Rohan Singh and Diptendu Dutta and Debasish Jana},
  journal= {arXiv preprint arXiv:2412.10717},
  year   = {2024}
}
R2 v1 2026-06-28T20:35:04.787Z