這是產出 71.5× token 節省 基準的語料:三個 Karpathy 的知名 repo(nanoGPT、minGPT、micrograd)+ 5 篇論文 PDF + 4 張圖。它展示了跨 repo 的符號連結與論文橋接。
本案例我們採用上游已提交的圖資料(worked/karpathy-repos/graph.json,包含論文與圖片節點的完整圖),用 graphify 0.9.36 重新分群並產生互動圖。
# 重現完整版(需 LLM key 處理論文/圖片)
git clone https://github.com/karpathy/nanoGPT
git clone https://github.com/karpathy/minGPT
git clone https://github.com/karpathy/micrograd
# + 下載 5 篇論文 PDF + 4 張圖,全部放進 raw/
graphify extract ./raw
# 本站做法:從上游 graph.json 重新分群(無需 LLM)
python scripts/gen-case-html.py graph.json graph.html GRAPH_REPORT.md
三個 repo 的程式碼 + 論文與圖片節點組成的圖。
| 指標 | 本站結果 |
|---|---|
| 節點數 | 177 |
| 邊數 | 246 |
| 社群數 | 16 |
| EXTRACTED 邊 | 83% |
| INFERRED 邊 | 17% |
我們重新分群的結果(上游原始圖略大)。14 個社群顯示、2 個過薄省略。
Value — 15 條邊GPT — 9 條邊Layer — 8 條邊Neuron — 7 條邊Encoder — 7 條邊CfgNode — 7 條邊AdditionDataset — 7 條邊完全合理:Value(micrograd 的自動微分核心)與 GPT / Layer / Neuron / Encoder(nanoGPT 的 transformer 元件)就是這批語料的真正抽象核心。
跨 repo 的驚喜連線(上游報告的亮點):
Block 元件跨 repo 相連——兩個 repo 實現同一套 transformer 概念。CausalSelfAttention——論文與程式碼的語意對應。這就是「論文節點連到程式碼節點」的價值:讀論文時直接看到它在程式碼裡的落點。
# 程式碼部分可用 --code-only 零 key 重跑:
mkdir raw && git clone https://github.com/karpathy/nanoGPT raw/nanoGPT
git clone https://github.com/karpathy/minGPT raw/minGPT
git clone https://github.com/karpathy/micrograd raw/micrograd
graphify extract ./raw --code-only