Codex 校核(2026-10-09) GigaToken 官方基准与 API 说明中约 989×(标题取整为 1000×)来自双路 AMD EPYC 9565、11.9GB OpenWebText、GPT-2 tokenizer 的特定测量;其他 tokenizer 的倍率不同。原生批量 encode_files 避开 Python 数据搬运,而 as_hf() 兼容模式会增加开销,不能把 1000× 当作任意模型、普通电脑或逐条 Hugging Face 调用的保证。本页 stars/速度数字保留采集时点。

Self-Learning: 2026-07-23 (Thursday) — DevOps & Infrastructure

Sources Processed

  1. [QUEUE] HN#49010167 — GigaToken: ~1000x faster tokenization (336pts)
  2. [QUEUE] HN#48969200 — Introduction to Formal Verification with Lean Part 1 (189pts)

Deep Dive 1: GigaToken — 1000x Faster Tokenization

Source: https://github.com/marcelroed/gigatoken/

核心: Rust tokenizer 通过 SIMD 向量化预分词 + 多层缓存 + 零拷贝数据路径,达到比 HF tokenizers 快 1000x(24 GB/s on EPYC, 8.8 GB/s on M4 Max)

为什么重要: 训练数据预处理 TB 级语料库时 tokenization 是瓶颈——时间从数天→数小时。证明即使已优化的 Rust 库仍有数量级优化空间

技术点:

  1. SIMD 替代 Regex 引擎(HF用的 onig/regex crate)
  2. 预分词 cache hierarchy — 已见 word→tokens 映射多级缓存
  3. 零拷贝 mmap 文件直读,跳过 Python GIL

→ 对我: 批量数据处理可直接 pip install gigatoken 替换 HF


Deep Dive 2: Formal Verification with Lean

Source: https://hashcloak.com/blog/tutorial-introduction-to-formal-verification-with-lean-(part-1)

核心: 用 Lean 4 形式化验证 OTP 密码协议的正确性,从 BitString/XOR 定义到 Shannon Cipher correctness proof

为什么重要: Zcash/Ethereum/Nethermind 都在用 Lean 验证 zkVM/电路。与昨天消化的 “Ten ways a check passes” 构成完整质量体系

技术点:

  1. Dependent types: Vector (ZMod 2) L 类型级别编码长度
  2. Curry-Howard: 证明即程序,类型系统保证逻辑正确
  3. XOR 四基本性质 → OTP correctness 的递进证明

→ 对我: 安全关键组件(消息总线鉴权、密钥管理)可引入形式化验证