Skip to content
View wulier-arch's full-sized avatar
  • Joined Sep 6, 2026

Block or report wulier-arch

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
wulier-arch/README.md
axon zero-dependency neural network framework

wulier-arch

与其调用黑盒,不如自己写一遍。

零依赖神经网络框架 axon 的作者。

我做东西关注同一件事:把底层原理摊开写清楚,并且证明它是对的。

Live Demo Latest Release Star axon npm

在做什么

axon · 零依赖神经网络框架

自动微分、张量运算、卷积、层、优化器与训练循环,全部手写。同一份代码在浏览器和 Node.js 里都能跑。

依赖 测试 最新版本 matmul 512×512
0 95 v0.3.0 2.36 GFLOP/s

核心主张是梯度可验证:每个算子都自带有限差分对照,梯度错了立刻暴露,而不是「跑起来没报错就算对」。这个机制抓到过三个静默 bug——前向传播完全正确,只有数值梯度能发现权重在错误地训练。

v0.3.0 补齐了 LayerNorm、Embedding、MultiHeadAttention、TransformerBlock 和 GELU。新增的梯度回归测试又抓到过一个只在 gamma 开启时出现的 LayerNorm 反向错误。

性能上坦白说比 TensorFlow.js 慢一个数量级,这是刻意的取舍:数据存在 Float64Array 里,但计算是标量 JS 循环,没有 WASM、没有 SIMD、没有算子融合。换来的是每一行都能读懂。适合学习原理,不适合训 ResNet。

在线 Demo · 项目主页 · v0.3.0 Release · 源码 · npm

rope-embedding · 零依赖旋转位置编码

axon 有 MultiHeadAttention 和 TransformerBlock,但一直没有位置编码——这个补上缺的那块。RoPE 出自 RoFormer,现在是开源大模型的默认选择。

从数学定义手写,不引入任何张量库。内置性质自检:正交性、范数保持、相对位置不变性全部数值验证,误差触到双精度机器 epsilon。

依赖 测试 自检最大偏差
0 48 2.22e-16

两种配对约定(half / interleaved)都实现——接错会静默出错,因为两者都满足全部数学性质,只是旋转的维度对不同。

源码

awesome-shlab-opensource · 开源导航

上海人工智能实验室开源项目的分类索引。重点不在「有哪些项目」,而在许可证风险标注——同一个页面上的项目,权限差异极大。

标记 含义
🟢 Apache-2.0 / MIT,自由使用
🟡 AGPL-3.0,衍生作品须同样开源
🟠 附加条款,如 MinerU 的商用阈值与在线署名义务
🔴 无许可证,默认保留所有权利,不得转载
⛔ 非商用许可,禁止商用与再分发

另附官方页面三处勘误:组织改名导致三个链接过期、把组织当成仓库、标称数量与实际不符。

源码

interstellar-courier · 星际快递员

零依赖、零构建,打开浏览器就能玩的 Canvas 迷你太空躲避游戏。

在线试玩

技术栈

JavaScript Node.js Canvas WebAudio GitHub Actions

手写自动微分 · 手写卷积 · 零依赖工程习惯 · 用有限差分验证梯度

联系

Email

欢迎在任一仓库提 Issue 或 PR。如果你给 axon 实现了新算子,请务必附上梯度校验用例——这是那个项目唯一的质量底线。

Popular repositories Loading

  1. interstellar-courier interstellar-courier Public

    星际快递员 - 零依赖、零构建,打开浏览器就能玩的 Canvas 迷你太空躲避游戏

    JavaScript

  2. axon axon Public

    Zero-dependency JavaScript neural network framework: autograd, tensors, convolution, training loops, and finite-difference gradient checks. 零依赖神经网络框架。

    JavaScript

  3. wulier-arch wulier-arch Public

    GitHub Profile README · 个人主页

  4. wulier-arch.github.io wulier-arch.github.io Public

    个人主页站点 · Personal homepage

    HTML

  5. awesome-shlab-opensource awesome-shlab-opensource Public

    上海人工智能实验室(SHLab)开源项目精选导航 · 含许可证风险标注与失效链接勘误

  6. rope-embedding rope-embedding Public

    零依赖的旋转位置编码(RoPE)实现:从数学定义手写,附正交性、范数保持与相对位置性质的数值验证

    JavaScript