The paper introduces KenLM, a library that implements two data structures—PROBING and TRIE—to efficiently query language models, reducing both time and memory costs. PROBING uses linear probing hash tables for speed, achieving 2.4 times the speed of SRILM while using 57% less memory. TRIE, optimized for memory, employs bit-level packing, sorted records, interpolation search, and optional quantization, using less memory than any lossless baseline and less CPU than the fastest baseline. The code is open-source, thread-safe, and integrated into translation systems like Moses, cdec, and Joshua. The paper details performance techniques and benchmarks against alternative implementations, demonstrating significant improvements in speed and memory usage.The paper introduces KenLM, a library that implements two data structures—PROBING and TRIE—to efficiently query language models, reducing both time and memory costs. PROBING uses linear probing hash tables for speed, achieving 2.4 times the speed of SRILM while using 57% less memory. TRIE, optimized for memory, employs bit-level packing, sorted records, interpolation search, and optional quantization, using less memory than any lossless baseline and less CPU than the fastest baseline. The code is open-source, thread-safe, and integrated into translation systems like Moses, cdec, and Joshua. The paper details performance techniques and benchmarks against alternative implementations, demonstrating significant improvements in speed and memory usage.