Repository navigation
Laya scorer: 8.75 s -> 0.38 s per decision, byte-identical output - #93
Conversation
The encoder ran its projections, GeGLU and attention on one thread. They now go through the threaded linear() and a per-(sequence, head) attention split, and linear() reads each weight row once per four input rows. Every sum keeps its order, so laya_gate output is byte-identical on both checkpoints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docs7 for 1bit-monster/engine
Commit |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
The encoder ran its projections, GeGLU and attention on one thread. Only the small decision head used the threaded
linear(). This PR changes three things:linear().linear()reads each weight row once per four input rows. The four sums are independent, so no sum changes order.Measured on Strix Halo with
1bit route --laya-model ~/models/laya-pinned --devices vulkan,hrx,zinc:Eight rows per weight load gave no further gain (0.38 s).
Correctness:
laya_gateoutput is byte-identical to the single-threaded scorer on the root andtyped-decisions/checkpoints (diffed against baseline runs, both PASS).ctest -R laya: 3/3 pass, includinglaya_route_e2e.Docs: laya.md gains a cost section, and README and PORTING quote 0.38 s.
🤖 Generated with Claude Code