Downloads · 30 days
58
25% of all-time downloads
ggunio/B2NL-IntelligentTokenizer-v6.2.1
B2NL-IntelligentTokenizer-v6.2.1 is a machine learning model from ggunio. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Progressive Byte-to-Natural Language Tokenizer with Learned Semantic Boundaries
Downloads · 30 days
58
25% of all-time downloads
All-time downloads
236
Public
Parameters
230M
1.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin922 MB · 50%
From the Hugging Face model README
Progressive Byte-to-Natural Language Tokenizer with Learned Semantic Boundaries
Current Status (Updated: 2025-10-XX)
🔄 Active Training: This model is currently being trained on a single RTX 4070 (12GB)
📊 Current Performance:
⚠️ Known Limitations:
🎯 Project Purpose:
This tokenizer is designed to enable more efficient LLM inference by separating language processing from reasoning:
This approach aims to make LLMs more efficient by offloading all linguistic processing to a specialized encoder/decoder.
🎯 Experiment Goal: Testing whether 48:1 compression is achievable across 204 languages with a single consumer GPU
Recommended: If you want higher completeness, please wait for training completion
Unlike traditional tokenizers (BPE, WordPiece) that split text using fixed rules, B2NL learns to identify semantic units within byte sequences through neural networks:
Traditional BPE: "안녕하세요" → "안", "녕", "하", "세", "요" (5 tokens, word fragments)
B2NL: "안녕하세요" → [emb1, emb2, emb3] (3 embeddings, meaning preserved)
[48 bytes input] → [Encoder] → [3 × 1280-dim embeddings] → [Decoder] → [48 bytes output]
↑ ↓
(with padding) (semantic compression)
For texts exceeding 48 bytes, the model employs sliding window with 8-byte overlap:
Chunk 1: [Bytes 0-48] → 3 embeddings
↓ (8-byte overlap)
Chunk 2: [Bytes 40-88] → 3 embeddings
↓ (8-byte overlap)
Chunk 3: [Bytes 80-128] → 3 embeddings
import torch
from unified_model import IntelligentTokenizerV62
# Load model
model = IntelligentTokenizerV62()
checkpoint = torch.load('pytorch_model.bin', map_location='cpu')
model.load_state_dict(checkpoint)
model.eval()
# Compress text to embeddings
text = "Hello, world!"
compressed = model.compress(text)
print(f"Embeddings: {compressed['num_tokens']}") # 3
print(f"Compression: {compressed['compression_ratio']}") # 16.0
# Reconstruct from embeddings
reconstructed = model.generate(text, temperature=0.1)
print(f"Original: {text}")
print(f"Reconstructed: {reconstructed}")
@software{b2nl_tokenizer_2025,
title = {B2NL-IntelligentTokenizer: Progressive Byte-to-Natural Language Tokenization with Learned Semantic Boundaries},
author = {Jinhyun Woo},
year = {2025},
month = {10},
version = {6.2.1},
url = {https://huggingface.co/ggunio/B2NL-IntelligentTokenizer-v6.2.1}
}
Apache 2.0