Repository navigation
Keep complete SQL training steps and optimizer state on GPU - #305
cromwellian wants to merge 9 commits into
Conversation
Support prepared SQL gradients, arithmetic chunk-grid counts and direct Arrow registration. Preserve Context metadata through extension installation, expose target partitions and guard physical reuse against value-dependent filters. Co-Authored-By: GPT-6 <noreply@openai.com>
Materialize shared reachable CTEs once, reuse stage programs with fresh physical state, and retain ddx differentiation of original views. Add optional session-local float64 CPU and float32 MLX kernel execution with SQL validation and fallback, using the separately maintained EinFold feature build. Co-Authored-By: GPT-6 <noreply@openai.com>
Build the upstream-compatible feature commit from the contribution fork. Co-Authored-By: GPT-6 <noreply@openai.com>
Lower supported DataFusion and ddx stages through EinFold compact programs, importing live inputs on each ordinary query and expanding coordinates only at Arrow snapshot boundaries. Bound computed intermediates, preserve row/NULL masks and retain conservative SQL fallback. Co-Authored-By: GPT-6 <noreply@openai.com>
Keep the compact executor build reproducible without copying native or array-program sources into this repository. Co-Authored-By: GPT-6 <noreply@openai.com>
Own finite rectangular state, reuse ddx primal outputs, and compile gradient, clipping and AdamW programs with explicit mutable inputs and atomic state publication. Add domain-checked GPU indices, checkpointable dropout, real Shakespeare training, independent nanoGPT validation and checkpoint/resume tests. Co-Authored-By: GPT-6 <noreply@openai.com>
Keep integration instructions aligned with the separate EinFold repository. Co-Authored-By: GPT-6 <noreply@openai.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Allow the clean persistent ddx checkout to satisfy the exact installer revision. Co-Authored-By: GPT-6 <noreply@openai.com>
Include their completed validation reports while keeping the tested numerical source unchanged. Co-Authored-By: GPT-6 <noreply@openai.com>
|
🌀 Claude: Thank you. A complete nanoGPT training step in SQL, with AdamW, clipping and dropout, gradients from ddx, and state kept on the GPU, at 101 ms against PyTorch MPS's 27 ms, is a remarkable result. Checking every loss, gradient, weight and optimizer moment against nanoGPT's own Strengths
Concerns
A suggested path: land demo 3 on the public APIs first, perhaps with the eager or plain path for now. The resident path can follow once #307 decides where |
🛠️ Codex
Keep complete SQL training steps and optimizer state on GPU.
TrainingSessionowns finite rectangular state, reuses the primal already computed by ddx, compiles gradient/clipping/AdamW stages with explicit mutable inputs, and atomically publishes state after validation. Bounded integer domains enable GPU token gathers and embedding-gradient scatter. Explicit seed/step dropout keys and NPZ checkpoints support deterministic resume; ordinary query input/snapshot behavior is preserved.Add real Shakespeare character training matching native nanoGPT: 10,745,088 parameters, batch 12/context 256, 6 layers/heads, width 384, exact GELU, dropout .2, clipped AdamW, original learning-rate/evaluation schedule.
--steps 5performs exactly five updates without shortening the schedule. An independent original-model/PyTorch oracle checks every loss, raw gradient, weight and optimizer moment outside the timer.Depends on compact SQL execution #303, EinFold #157, and ddx #256/#257. Incremental review: cromwellian/xarray-sql@codex/compact-sql-execution...codex/resident-sql-training . The upstream fork PR's default diff contains predecessors until they merge.
Measured resident GPU: 101.3 ms mean over updates 2–100, versus the earlier Arrow GPU path's 2.024 s (19.98×). Native PyTorch MPS measured 27.0 ms; SQL remains 3.76× slower. A separate fully checked five-step run measured 145.9 ms warm. All 100 timed resident steps exported zero arrays and read zero array bytes, while each read a validation flag and loss scalar. There was one whole-step compilation. Batch upload, evaluation, oracle exports and checkpoint I/O are outside the timer; startup caches were not isolated. The performance/evidence PR provides complete scope and raw records.
Validation: 714 non-integration tests passed against rebuilt dependency wheels, including ownership, failure atomicity, changed compiled tokens/LR, loss snapshots and checkpoint/resume. Changed-file Ruff and Rust formatting passed. The optional builders pin separately maintained dependency commits instead of carrying copied patches.