Repository navigation
Commit 714ba63
Write the GPT as functions of relations, as nanoGPT's modules are
Each piece of the model took the names of its input and output tables
and returned the CTEs it added, as (name, sql) pairs: a shape the
DataFusion workaround for shared CTEs needed, which made the model hard
to read. Now each piece takes relations and returns one, a SELECT that
reads its inputs by name, so a block reads as nanoGPT's Block.forward:
x = residual(x, attention(layer_norm(x, "ln_1", layer), layer))
return residual(x, mlp(layer_norm(x, "ln_2", layer), layer))
_relation.py lists every relation a loss reads, in order, as the CTEs of
one query, and names each one, never as a table it would hide. The SQL
is the same, CTE for CTE, and the demo matches JAX as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NyN7idACeDMh94qrnFMu6h1 parent cb935d0 commit 714ba63
3 files changed
Lines changed: 245 additions & 166 deletions
0 commit comments