[FEAT#80] neuron Phase 17 — scale-up validation (DST + grow advantage at larger scale) - #81
Conversation
- notebooks/02-function-level/17-phase17-scale-up.ipynb 신규 - 코드 변경 없음 — 기존 framework (Phase 15/16) 가 모든 config 지원하므로 *scale 자체의 영향* 검증 - scale-up (Phase 16 대비): - hidden_dim: 128 → 256 (2x), n_layers: 4 → 6, ffn(L): 256 → 512 (2x) - max_steps: 1500 → 5000 (3.3x), 추정 params: ~1M → ~5M (5x) - 4 mode × 2 seed = 8 run: - dense_large (target reference) - static_prune_50 (Phase 15 at scale) - DST_RigL_50 (Phase 16a at scale, period=200/swap=5% — 16a 의 50/10% 보다 보수적) - grown (Phase 16b at scale, ffn 256 → 512 at step 2500) - 자동 verdict 4 + Phase 16 vs 17 막대그래프 비교 - 핵심 가설: - DST_RigL ≤ static (Phase 16a advantage scale 한계 해소?) - grown ≤ dense_large + 0.02 (Phase 16b gap 축소?) - plateau 도달 분석 (마지막 500 step drift)
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds a new Phase 17 Jupyter notebook that runs a 10-run scale-up sweep (5 modes × 2 seeds) on a larger Hybrid Transformer config using TinyShakespeare, constructs per-run HybridTransformerTrainConfig entries, runs training, computes per-mode statistics and automated verdicts, and produces loss-curve and Phase16-vs-Phase17 comparison plots. ChangesPhase 17 Scale-up Validation Experiment
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Jupyter notebook (17-phase17-scale-up.ipynb) to evaluate the scale-up performance of dynamic model methods (DST, Net2Net grow) across four training modes and two seeds. The review feedback highlights several potential runtime and visualization issues when running with non-default configurations, such as low step counts or a single seed. Specifically, suggestions were made to safely calculate DST_END_STEP to avoid non-positive values, dynamically split the loss history for plateau analysis when steps are fewer than 500, and handle standard deviation calculations gracefully when only a single seed is provided.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@notebooks/02-function-level/17-phase17-scale-up.ipynb`:
- Around line 375-377: The current out_dir =
Path("../../runs/notebook-neuron-phase17") and subsequent fig.savefig calls use
a CWD-dependent path; change them to compute a repository-root–stable path
(e.g., determine the repo root via git repo discovery or a well-known repo root
variable and then set out_dir = repo_root / "runs" / "notebook-neuron-phase17")
and use that out_dir for fig.savefig of "loss_curves.png" and the later
"phase16_vs_phase17.png" so artifacts always save inside the repository
regardless of working directory; update the code that defines out_dir and the
two fig.savefig calls to reference the new repo-root–based out_dir.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: da0267b2-6ba2-44af-8da4-6838ffe22bdd
📒 Files selected for processing (1)
notebooks/02-function-level/17-phase17-scale-up.ipynb
There was a problem hiding this comment.
Pull request overview
Phase 17 scale-up 검증을 위해 기존 graphlm.neuron 학습 framework를 사용하는 신규 실험 노트북을 추가합니다. 코드 변경 없이 Phase 16의 DST/RigL 및 Net2Net grow 가설을 더 큰 모델/긴 학습 설정에서 재검증하는 목적입니다.
Changes:
- 4개 mode(
dense_large,static_prune_50,DST_RigL_50,grown) × 2개 seed sweep 구성 추가 - scale-up 설정 및 자동 verdict/all-finite/plateau 분석 셀 추가
- loss curve 및 Phase 16 vs Phase 17 비교 시각화 추가
- gemini #3314998767 (cell 4): DST_END_STEP = MAX_STEPS - 500 이 MAX_STEPS<500 시 음수 → ValueError. → DST_END_STEP = max(1, MAX_STEPS - 500) 로 변경 (빠른 디버깅 시 안전). - gemini #3314998775 (cell 8): plateau 분석의 [:250] / [250:] 하드코딩 이 짧은 학습 시 부정확. → 동적 half 분할 (half_len = len(last_500) // 2 + 조건문). - gemini #3314998777 (cell 10): arr.std(dim=0) with single seed → NaN 으로 fill_between 깨짐. → arr.size(0) > 1 일 때만 std, 아니면 zeros_like 로 안전 처리.
- Copilot #3315013786 (Major scientific): Phase 17 의 DST_RigL 가 period/swap 도 함께 변경 → scale 효과와 hp 효과 confounded → DST_RigL_p16hp (Phase 16a 와 동일 hp, period=50/swap=0.1) 를 control 로 추가. 5 mode × 2 seed = 10 run. - p16hp 가 순수 scale 효과 측정 (Phase 16a 와 직접 비교 가능) - p17hp 는 hp ablation 참고 - cell 0 markdown 에 confound 명시 + 분리 설계 설명 - verdict 2 (DST advantage) 는 이제 p16hp 기준 — 순수 scale 효과 - verdict 2b 추가: p17hp - p16hp = hp 효과 측정 - Copilot #3315013726 (hardcoded baseline): cell 12 의 Phase 16 수치 출처 명확화 → Notion page URL 주석 추가 (16a / 16b 각각) + config 명시 + 향후 CSV 자동 로드 검토 노트 - CodeRabbit #3315689817 (ack): 내 reply 에 동의 + learning 추가, 코드 변경 없음 - Phase 16 baseline 막대그래프는 p16hp 만 비교 (같은 hp, scale 만 다름 → 순수 scale 효과 시각화)
연관 이슈
구현 내용
Phase 16 (16a + 16b) 의 가설 검증 — paradigm 의 dynamic method (DST, Net2Net grow) 의 advantage 가 scale-up 으로 발현되는지 검증. Phase 16 의 negative result 가 scale 한계 로 결론났으니, 실제로 scale 을 키워 확인.
코드 변경 없음
Phase 15/16 의 framework 이 이미 모든 config 지원 (TrainConfig 의 hidden_dim/n_layers/ffn_dim/max_steps 등). Phase 17 의 검증 대상은 scale 자체의 영향 이므로 새 코드 없이 노트북만 추가.
Scale-up 변화 (Phase 16 대비)
신규 노트북
notebooks/02-function-level/17-phase17-scale-up.ipynbdense_large(큰 모델 baseline, target reference)static_prune_50(Phase 15 at scale)DST_RigL_50(Phase 16a at scale, period=200/swap=5% — 16a 의 보수적 변형)grown(Phase 16b at scale, ffn 256 → 512 at step 2500)DST hyperparameter 조정 의도
Compute 추정
CI / 머지 게이트 점검
변경 영향 범위
notebooks/02-function-level/(1 신규). 코드 / 테스트 변경 없음.Low— 순수 노트북 추가, 기존 framework 사용Required Status Checks
롤백 계획
Phase 17 후 다음 단계 (사용자 결정)
GPU 사용자 측 실행 후 verdict 분석 + 다음 단계 결정.
Summary by CodeRabbit