Soroban 是一个实践型仓库,通过手动计算反向传播步骤来学习神经网络训练,然后使用代码和多种实现进行验证。

Stars

5

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

MIT

最近更新

2026-07-30

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它通过要求在学习任何自动化之前进行手算,并用三种独立实现(纸笔、Python、Go)相互校验,弥合了数学直觉与代码之间的鸿沟。

适合谁使用

  • 难以掌握反向传播理论的自学者
  • 数学基础薄弱的机器学习初学者
  • 寻找互动教学材料的教育工作者
  • 想深入理解自动求导和训练过程的开发者

典型使用场景

  • 通过具体逐步算术学习反向传播
  • 将手算与断言驱动的代码对比以验证理解
  • 以低门槛、可重复的方式教授神经网络基础
  • 在真实硬件或 Colab 上实验小型模型(如 bigram、注意力机制)

项目优势

  • 无需超过基本算术的数学基础;微积分概念从零构建
  • 每节课都包含手算、代码和正确性断言
  • 三种语言(手算、Python NumPy、Go)交叉校验,捕捉错误并加深理解
  • 课程从单个神经元逐步推进到 GPT-2 FLOPs 和单张 4090 上的 LoRA 微调

使用前须知

  • 部分课程(0009、0010)需要 GPU,限制免费环境实验
  • 专注于小型教学示例,不覆盖生产级训练
  • Go 库为补充内容,核心学习路径并非必需

README 快速开始

soroban

[!NOTE] The GPU lessons in this repo are developed and tested on a real RTX 4090 machine generously provided by longkt90. None of the hardware measurements would exist without it. Thank you.

Soroban (算盤) is the Japanese abacus, the tool for doing real arithmetic by hand. That is the whole idea of this repo: learn to train neural networks by computing the training runs yourself, on paper, with a four-function calculator, and only then letting the machines confirm your numbers.

I started this because every explanation of backpropagation I read either hid the arithmetic behind matrix notation or hid it behind a framework. Neither ever made it stick for me. What made it stick was sitting down and computing three steps of gradient descent by hand, then writing code whose only job was to agree with my paper. So that is the format of every lesson here.

Every lesson follows the same discipline. You predict what will happen, you compute a small training run entirely by hand, then code reproduces your arithmetic with assert statements standing guard over every number, and finally you break something on purpose and study the wreckage. If the asserts pass, the machine has agreed with your paper. If they fail, you get to find out who is wrong, and learning to find out who is wrong is the actual curriculum.

There is no required background beyond arithmetic. The one calculus idea we need (a derivative is a slope you can measure by nudging) is built from a numerical experiment inside lesson 0001, not imported from a course you were supposed to have taken. And when notation gets in the way, the maths shelf has one plain-language page per symbol and idea, each worked out on the same numbers the lessons use, so the lessons can stay focused on training while the shelf carries the reference material.

The lessons

#LessonYou compute by handRuns onStatus
0001one neuron learns a line3 full gradient descent steps, every multiplication shownany CPUdone
0002a hidden layer learns a Va full backward pass through two layers, all seven gradientsany CPUdone
0003[ice, water, steam](lessons/0003-classific

项目描述

Learn to train neural networks by hand: paper arithmetic, asserted code, and a from-scratch Go autograd, one lesson at a time

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

7-e1even
精选
7-e1even GitHub avatar

learn-agent

A collection of notes on building coding agents, derived from the production development of the desktop agent Reina, with each mechanism simplified into a zero-dependency, single-file Node.js demo.

AI 与机器学习大语言模型
218
slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960
jamesob
精选
jamesob GitHub avatar

local-llm

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.

AI 与机器学习大语言模型
1,660