"智能不是记忆过去的所有细节,而是掌握生成未来的核心方程。"
"Intelligence is not about memorizing every detail of the past, but mastering the core equations that generate the future."
H2Q-MicroStream 是一个极具实验性的深度学习架构,旨在探索语言模型的物理动力学本质。与追求巨大参数量和超长上下文窗口的主流 Transformer 不同,本项目基于奥卡姆剃刀原则 (Occam's Razor) 和 **全息原理 (Holographic Principle)**,构建了一个极简、实时、且具有强物理约束的“思维内核”。
H2Q-MicroStream is a highly experimental deep learning architecture designed to explore the physical dynamics of language models. Unlike mainstream Transformers that chase massive parameter counts and infinite context windows, this project builds a minimalist, real-time, and physically constrained "Thinking Kernel" based on Occam's Razor and the Holographic Principle.
思考内化 vs. 语言表达 (Internalization vs. Expression):
状态保持 vs. 历史回溯 (State-based vs. Retrieval-based):
本质压缩 (Essence Compression):
引入四元数 (Quaternion) 代数,将注意力机制从标量积升级为四维时空干涉。
Moves attention from scalar products to 4D spacetime interference. Real parts represent energy/amplitude; Imaginary parts represent spin/phase, introducing nonlinear Phase Rotation Feedback to capture high-dimensional linguistic entanglement.
模型权重不是静态矩阵,而是通过 Structure Bank 动态生成的。我们强制将 Rank 限制为 8。
Weights are dynamically generated via a Structure Bank with a forced Rank of 8. This forces the model to abandon rote memorization and extract only the 8 most essential spacetime evolution patterns.
摒弃了 BPE Tokenizer (如 Tiktoken ),直接使用 Unicode (ASCII/UTF-8) 编码。
Abandons BPE Tokenizers for direct Unicode (ASCII/UTF-8) encoding. establishing a universal physical interface. Uses parallel streaming to simulate continuous reading flow rather than random slicing.
Simulates biological high-frequency impulse learning. With a micro-batch of 24 and continuous updates, the parameters undergo continuous differential evolution in the manifold space.
克隆仓库 / Clone the repository
git clone https://github.com/makai891124-prog/H2Q-Transformer.git
cd H2Q-Transformer
安装依赖 / Install dependencies
pip install torch numpy requests
运行训练 / Run training 无需手动下载数据,脚本会自动下载 WikiText-2 数据集并开始训练。 No need to manually download data; the script will automatically download WikiText-2 and start training.
python main.py
在 main.py 中的 CONFIG 字典中调整参数。当前默认配置为 "H2Q-MicroStream" 模式:
CONFIG = {
'dim': 768, # 模型宽度 (GPT-2 Small level)
'fixed_rank': 8, # 🌟 核心参数:限制模型的"脑容量"以逼迫其思考
'seq_len': 128, # 微视界:只关注当下瞬间
'batch_size': 24, # 物理 Batch:极小,高频更新
'depth': 12, # 深度
'axiom_lambda': 0.1, # 正交性约束强度
# ...
}
目前的 H2Q 模型是一个纯粹的思维内核。它的输出可能看起来像“乱码”或极其抽象的方言,这是因为它正在展示内部的原始状态流。
未来的开发计划包括:
The current H2Q model is a pure thinking kernel. Future plans include training a separate "Projector" to translate holographic states into human language, exploring multimodal byte streams, and edge deployment via high compression rates.
本项目采用 MIT License 开源。
感谢所有探索几何深度学习、SSM (State Space Models) 以及对 Transformer 架构进行反思的研究者们。本项目的灵感来源于全息原理、哈密顿力学以及人类认知的本质。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.