/// Index
01Home02Projects03Tech Stack04Experience05Achievements06Contact

SYSTEM: ONLINE
V.2.0.4

Case Study // tokenizer-pipeline

Edge Tokenizer

Hybrid BPE/BBPE tokenizer for Hinglish with O(1) C++ optimization.

OOV Rate0%
LookupO(1)
Latency<1ms
LanguageHinglish
DEMO_RECORDING
[ VIDEO ASSET REQUIRED ]

02 // Architecture Execution

Built a custom BPE tokenizer featuring a Hybrid Code-Mixed Router to eliminate token shattering. Optimized the lookup engine using a C++ Hash Map for O(1) efficiency, achieving sub-1ms latency on simulated edge hardware.

01 // The Problem Context

Standard BPE tokenizers often 'shatter' transliterated Hinglish text into meaningless individual characters, losing critical semantic roots during inference.

System Stack

PythonC++FastAPINext.js
core_module.ts
// C++ O(1) Hash Map Lookup
std::string lookupToken(int tokenID) {
    auto it = vocabMap.find(tokenID);
    return (it != vocabMap.end()) ? it->second : "[UNK]";
}
// Optimized for single-core edge environments