docs: add comprehensive model card README for Synaptic Edge 65k Tokenizer
Browse files
README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- hi
|
| 5 |
+
- ta
|
| 6 |
+
- te
|
| 7 |
+
- es
|
| 8 |
+
- fr
|
| 9 |
+
- de
|
| 10 |
+
- zh
|
| 11 |
+
license: mit
|
| 12 |
+
tags:
|
| 13 |
+
- tokenizer
|
| 14 |
+
- bpe
|
| 15 |
+
- byte-level
|
| 16 |
+
- code
|
| 17 |
+
- stem
|
| 18 |
+
- neuromorphic
|
| 19 |
+
- synaptic-edge
|
| 20 |
+
- pytorch
|
| 21 |
+
- triton
|
| 22 |
+
pipeline_tag: text-generation
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# Synaptic Edge 65,536 ByteLevel BPE Tokenizer ⚡🧠
|
| 26 |
+
|
| 27 |
+
The official **65,536-vocabulary ByteLevel BPE Tokenizer** custom-engineered for the **Synaptic Edge 150M & 1B Neuromorphic Foundation Models**.
|
| 28 |
+
|
| 29 |
+
Trained on over **1.6+ Billion tokens** of source code, AI system kernels, formal mathematics, and multilingual texts.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## Key Highlights
|
| 34 |
+
|
| 35 |
+
- **Exact $2^{16}$ Alignment**: Vocabulary size is strictly **65,536**, ensuring exact power-of-2 alignment with GPU warp registers and Triton megakernel tensor cores.
|
| 36 |
+
- **Zero OOV / Zero `<unk>`**: ByteLevel fallback guarantees that every byte of UTF-8 text can be processed losslessly without out-of-vocabulary errors.
|
| 37 |
+
- **Code & Kernel Optimized (~70% Mixture)**:
|
| 38 |
+
- Multi-space indentation tokens (` `, ` `, ` `, `\t`) eliminate token explosion in nested code blocks.
|
| 39 |
+
- Pre-seeded with Andrej Karpathy's `nanoGPT`/`llm.c`, OpenAI Triton megakernels, BitNet 1.58b STE, and Lean 4 formal proofs.
|
| 40 |
+
- Delivers a **~2.2× compression ratio improvement** over standard NLP tokenizers on Python, C++, Rust, and CUDA.
|
| 41 |
+
- **Structural Repo-Level Scoping**: Built-in first-class scoping tags (`<repo>`, `</repo>`, `<file>`, `</file>`, `<think>`, `</think>`) for continuous multi-file repository pretraining.
|
| 42 |
+
- **1,000,000-Token Native Context**: Calibrated for ultra-long context streams paired with **3D Bit-RoPE** and **Continual Dynamic Synaptic Plasticity**.
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## Domain Mixture Breakdown
|
| 47 |
+
|
| 48 |
+
| Domain | Ingested Samples / Files | Key Sources |
|
| 49 |
+
| :--- | :--- | :--- |
|
| 50 |
+
| **Code & AI Systems (45%)** | 455,000+ files | `codeparrot-clean`, `Magicoder-OSS-75K`, `CodeFeedback`, `Evol-Instruct-Code` |
|
| 51 |
+
| **PCMB & Formal Math (25%)** | 300,000+ docs | `open-web-math`, LaTeX equations, Lean 4 theorems, SMILES molecular formulas |
|
| 52 |
+
| **Natural Language & Multi (30%)** | 330,000+ articles | `fineweb-edu`, Aya Multilingual (65 languages), Wikipedia (7 global languages) |
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
## Quickstart
|
| 57 |
+
|
| 58 |
+
### 1. Using Hugging Face `transformers`
|
| 59 |
+
```python
|
| 60 |
+
from transformers import AutoTokenizer
|
| 61 |
+
|
| 62 |
+
tokenizer = AutoTokenizer.from_pretrained('SurendraVB/Synaptic-Edge-Tokenizer-65K')
|
| 63 |
+
|
| 64 |
+
code_snippet = '''@triton.jit
|
| 65 |
+
def fused_kernel(a_ptr, b_ptr, BLOCK_M: tl.constexpr):
|
| 66 |
+
pass'''
|
| 67 |
+
|
| 68 |
+
tokens = tokenizer(code_snippet)
|
| 69 |
+
print('Token IDs:', tokens.input_ids)
|
| 70 |
+
print('Decoded:', tokenizer.decode(tokens.input_ids))
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
### 2. Using Fast Rust `tokenizers`
|
| 74 |
+
```python
|
| 75 |
+
from tokenizers import Tokenizer
|
| 76 |
+
|
| 77 |
+
tokenizer = Tokenizer.from_pretrained('SurendraVB/Synaptic-Edge-Tokenizer-65K')
|
| 78 |
+
output = tokenizer.encode('def forward(self, x: torch.Tensor):\n return x * 2')
|
| 79 |
+
print('Subwords:', output.tokens)
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
---
|
| 83 |
+
|
| 84 |
+
## Special Scoping & Indentation Tokens
|
| 85 |
+
|
| 86 |
+
| Token | Purpose | Impact |
|
| 87 |
+
| :--- | :--- | :--- |
|
| 88 |
+
| ` ` (4 spaces) | Standard indentation | Encodes a 4-space tab in a single token instead of 4 separate tokens |
|
| 89 |
+
| ` ` (8 spaces) | Kernel / Deep indentation | Compresses 8 spaces into a single atomic ID |
|
| 90 |
+
| `<repo>`, `</repo>` | Repository scoping | Signals repository boundaries in streaming pretraining |
|
| 91 |
+
| `<file>`, `</file>` | File boundaries | Delimits multi-file continuous context streams |
|
| 92 |
+
| `<think>`, `</think>` | Cognitive attractor reasoning | Wraps cognitive latent attractor settling traces |
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
## Citation & Architecture
|
| 97 |
+
|
| 98 |
+
```bibtex
|
| 99 |
+
@misc{synaptic_edge_2026,
|
| 100 |
+
author = {Surendra Reddy Vundela},
|
| 101 |
+
title = {Synaptic Edge: 1-Bit Ternary Continual Learning Neuromorphic Foundation Architecture},
|
| 102 |
+
year = {2026},
|
| 103 |
+
publisher = {Hugging Face},
|
| 104 |
+
howpublished = {\url{https://huggingface.co/SurendraVB/Synaptic-Edge-Tokenizer-65K}}
|
| 105 |
+
}
|
| 106 |
+
```
|