Skip to content

Add NGB v4 tuned and expressive nanoGPT baselines - #51

Draft
charlesmartin14 wants to merge 22 commits into
mainfrom
agent/ngb-v4-complete
Draft

Add NGB v4 tuned and expressive nanoGPT baselines#51
charlesmartin14 wants to merge 22 commits into
mainfrom
agent/ngb-v4-complete

Conversation

@charlesmartin14

Copy link
Copy Markdown
Member

Purpose

Add a genuinely separate baseline/ngb experiment family for properly tuned small-language-model optimizer baselines. The existing one-head v3 protocol and its checked-in results remain unchanged.

Protocols

Tuned one-head v4

  • 1 block, 1 head, width 128, context 256
  • 2 corpus-equivalent epochs
  • separate result namespace: /tmp/rg-ngb/results/ngb_v4_one_head_2epoch
  • SGD: peak 0.05, floor 5e-4, 5% warm-up
  • AdamW: peak 3e-4, floor 1e-5, 2.5% warm-up, decay 0.10
  • Muon: matrix peak 0.01, floor 2e-4, matrix decay 0.02; auxiliary AdamW peak 3e-4, floor 1e-5, decay 0.10

Distinct small 4x4 v4

  • 4 transformer blocks
  • 4 attention heads
  • width 128, context 256
  • 7,253,248 trainable parameters
  • 24 WeightWatcher/Muon hidden matrices
  • 2 corpus-equivalent epochs
  • separate result namespace: /tmp/rg-ngb/results/ngb_v4_small_4x4_2epoch

Implementation

  • generalized GPT implementation for arbitrary positive layer/head counts
  • shared verified FineWeb-Edu corpus, with protocol-scoped results and fingerprints
  • dynamic 6×n_layer WeightWatcher inventory and completion validation
  • conda-native direct Python/Papermill workflow; no shell wrappers
  • /tmp/rg-ngb runtime default with no home-directory fallback
  • restart-safe training and strict completed-run validation

Corrected comparisons

The two comparison notebooks now:

  • discover the complete seed intersection shared by all optimizers
  • reject unmatched requested seed sets
  • report run-level two-sided 95% Student-t intervals
  • report matched-seed paired optimizer differences
  • report final versus validation-selected test metrics
  • report best validation step, final-minus-best drift, clipping frequency, and maximum update-to-weight ratio
  • derive perplexity intervals by exponentiating loss-space confidence limits, preventing impossible negative perplexity bounds
  • provide full and post-transient task plots
  • provide optimizer-level and block-resolved WeightWatcher alpha, ERG-gap, and trap plots

Files

  • two explicit v4 YAML protocols
  • generalized rg_ngb package
  • two training notebooks
  • two corrected comparison notebooks
  • architecture, optimizer, path, notebook, matched-seed, paired-statistics, and perplexity regression tests
  • dedicated NGB job in baseline CI

Safety

No v3 source notebook, output notebook, result directory, optimizer profile, or protocol fingerprint is modified. NGB installs alongside the existing one-head package and uses a separate /tmp/rg-ngb root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant