feat: add performance.yaml example and enable gradient_checkpointing in borealis_1b (issue #6 items 6-7) - #22
Merged
marksverdhei merged 1 commit intoMar 29, 2026
Conversation
Owner
ReviewThe performance.yaml example is well-documented and the gradient_checkpointing change in borealis_1b makes sense. Good addition. Needs rebase: This PR includes the bitsandbytes skip guard that was already merged via #21. Please rebase onto main to drop the duplicate diff — the rest of the PR is clean and ready to merge after that. |
…in borealis_1b (issue marksverdhei#6 items 6-7) Addresses issue marksverdhei#6 items 6 (gradient checkpointing) and 7 (8-bit Adam): - New `examples/performance.yaml`: demonstrates all high-impact perf knobs in one place — gradient_checkpointing, adamw_bnb_8bit, flash_attention_2, larger batch with accumulation, and all-linear LoRA targets. Includes inline comments explaining each tradeoff. - `examples/borealis_1b.yaml`: enables gradient_checkpointing (was false). For a 1B model on a 24GB GPU the VRAM savings allow batch_size to increase, more than recovering the ~20-30% wall-clock overhead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hai-pilgrim
force-pushed
the
feat/performance-example
branch
from
March 29, 2026 17:48
e2ecebc to
bfcda9b
Compare
marksverdhei
approved these changes
Mar 29, 2026
marksverdhei
left a comment
Owner
There was a problem hiding this comment.
Reviewed. The performance.yaml example is well-documented with clear comments explaining each knob. The gradient_checkpointing flip in borealis_1b is appropriate for 1B+ models. The bitsandbytes skip guard overlap with #21 resolved cleanly. LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes parts of #6 (items 6 and 7):
New
examples/performance.yaml: A single annotated config showcasing all high-impact performance knobs:gradient_checkpointing: true— saves VRAM, enables larger batchesoptim: "adamw_bnb_8bit"— 8-bit Adam via bitsandbytes, cuts optimizer memory ~75%attn_implementation: "flash_attention_2"— 2-4x attention speedup on long sequencesper_device_train_batch_size: 4+gradient_accumulation_steps: 2— effective batch 8target_modules: all-linear— targets every linear layer for maximum adapter coverageexamples/borealis_1b.yaml: Enablegradient_checkpointing: true(wasfalse). For a 1B model on 24GB VRAM, the memory savings allow larger batch sizes that more than recover the ~20-30% wall-clock overhead noted in the issue.Remaining issue #6 items
_prompt_length_cacheTest plan
examples/performance.yamlis valid YAMLborealis_1b.yamlnow hasgradient_checkpointing: true🤖 Generated with Claude Code