Skip to content

Commit 487cd47

Browse files
committed
docs: name the two things a reader will notice anyway
main.rs is about 136,000 lines and model_api.rs about 68,000. Saying so, and saying they want splitting, is better than letting someone find it and conclude nobody looked. The note points at the library code instead, which is normal sized and is where the work is. Same for the 84 CLI subcommands with names like gpu-paged-mla-fp8-splitk-ragged-full-latent-gate. They are hardware gates named after what they gate. just --list is the curated surface and the README says so.
1 parent 2c74a0c commit 487cd47

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,26 @@ order that makes each piece land before the next one needs it.
645645

646646
---
647647

648+
### Two things you'll notice
649+
650+
`crates/mainarch-cli/src/main.rs` is about 136,000 lines, and
651+
`model_api.rs` is about 68,000. That is not a good shape and nobody is pretending
652+
otherwise. Both grew as harnesses, one holding 84 CLI subcommands that are mostly
653+
hardware gates, the other holding a declarative metadata surface plus the tables
654+
that pin it. They are wide rather than deep, so they read as a catalogue rather
655+
than a call graph, but the honest summary is that they want splitting and have
656+
not been split.
657+
658+
The library code is where the interesting work is, and it is normal sized.
659+
`olmo2.rs` is about 1,600 lines, `attn.rs` about 3,500, `model.rs` about 2,100,
660+
`gpu.rs` about 27,000 because it is the whole device layer. Start there. The
661+
reading order above skips both large files deliberately.
662+
663+
The other thing is that `mainarch --help` lists 84 subcommands with names like
664+
`gpu-paged-mla-fp8-splitk-ragged-full-latent-gate`. Those are hardware gates,
665+
each pinning one thing that was hard to get right, and they are named after what
666+
they gate rather than for a reader. `just --list` is the curated surface.
667+
648668
## Layout
649669

650670
```

0 commit comments

Comments
 (0)