Conversation
Member
Author
|
/run-checks
|
Implement the complete Byte-Pair Encoding (BPE) tokenizer infrastructure in
`tokenizer.h` to power sub-word tokenization, serialization, and text streaming
for the `llm.cpp` r epo
Key features and implementation details:
- BPE Vocabulary & Merges:
- Added data structures to manage the vocabulary map (`vocab`), reverse
lookup tables, and merge ranks (`merge_ranks`) loaded from training artifacts.
- Implemented custom byte-level fallback encodings to handle raw string sequences
gracefully without out-of-vocabulary (OOV) crashes.
- Encoding & Decoding Pipelines:
- `encode()`: Converts raw input text strings into sequences of integer token IDs
by iteratively merging adjacent byte pairs based on learned priority ranks.
- `decode()`: Reconstructs human-readable text streams from vector token arrays.
- Serialization & File I/O:
- Added binary and text file loading/saving routines to persist vocabulary
weights and merge dictionaries across runtime sessions.
- Included error handling and stream validation for missing or corrupted tokenizer files.
📋 Maintainer Check Results
Overall Result: ❌ CHECK FAILURES DETECTED |
eamonsippy
approved these changes
Jul 30, 2026
eamonsippy
requested review from
a team and
eamonsippy
and removed request for
eamonsippy
July 30, 2026 06:52
Member
Author
Checking ./main.cpp
./main.cpp:22:10: fatal error: include/lm.h: No such file or directory
22 | #include "include/lm.h"
| ^~~~~~~~~~~~~~The compiler is failing on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement the complete Byte-Pair Encoding (BPE) tokenizer infrastructure in
tokenizer.hto power sub-word tokenization, serialization, and text streamingfor the
llm.cppr epoKey features and implementation details:
vocab), reverselookup tables, and merge ranks (
merge_ranks) loaded from training artifacts.gracefully without out-of-vocabulary (OOV) crashes.
encode(): Converts raw input text strings into sequences of integer token IDsby iteratively merging adjacent byte pairs based on learned priority ranks.
decode(): Reconstructs human-readable text streams from vector token arrays.weights and merge dictionaries across runtime sessions.
[Feature]: Complete BPE Tokenizer Infrastructure for Sub-word Tokenization and Serialization #70