You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
forgelm/templates/LICENSES.md: false claim — Templates can rely on the trainer's default for gradient_checkpointing (auto-enabled when CUDA is available — see forgelm/trainer.py); only set it expli… (DOC-D4B02-005) #271
A contributor who follows the guidance and sets gradient_checkpointing in a template config breaks forgelm quickstart for that template (config error, exit 1).
Primary finding
DOC-D4B02-005 — forgelm/templates/LICENSES.md: false claim — Templates can rely on the trainer's default for gradient_checkpointing (auto-enabled when CUDA is available — see forgelm/trainer.py); only set it expli…
severity High · already tracked: KNOWN-OPEN C31-DOC-SCHEMA-PROSE docs/roadmap/risks-and-decisions.md:184
The document says. Templates can rely on the trainer's default for gradient_checkpointing (auto-enabled when CUDA is available — see forgelm/trainer.py); only set it explicitly when you need to override.
What the code does. The auto-enable part is true (trainer.py:514 sets gradient_checkpointing = torch.cuda.is_available()). An override cannot be set: TrainingConfig has no gradient_checkpointing field and extra='forbid' rejects it. Verified: a config with training.gradient_checkpointing: true fails with "Extra inputs are not permitted".
User impact. A contributor who follows the guidance and sets gradient_checkpointing in a template config breaks forgelm quickstart for that template (config error, exit 1).
Proposed correction. Templates cannot set gradient_checkpointing: it is not a config field (TrainingConfig forbids unknown keys). The trainer enables it automatically when CUDA is available (see forgelm/trainer.py).
Acceptance criteria
Each statement is re-checked against the code at fix time.
Documentation listed above is corrected in English and in its Turkish mirror in the same PR.
Every finding in this issue is resolved or explicitly closed with a reason.
Found by the October 2026 ForgeLM code and documentation review against commit cab2947. Code links point at that commit; line numbers may have moved since. Finding IDs (CR-…, DOC-…, TECH-…) are stable references for this backlog.
Thanks for taking a look. Claim it by starting a comment with /assign so nobody duplicates the work.
What is wrong. Item 2 of "Adding a new template" in forgelm/templates/LICENSES.md (about lines 30-34) says a template can rely on the trainer's default for gradient_checkpointing and "only set it explicitly when you need to override".
The first half is true: the trainer turns it on when CUDA is available (forgelm/trainer.py, search for "gradient_checkpointing": torch.cuda.is_available()).
The second half is false: TrainingConfig has no such field and rejects unknown keys. A template that sets it fails validation, and forgelm quickstart stops with a config error. You can see it yourself:
importyamlfromforgelm.configimportForgeConfigd=yaml.safe_load(open("forgelm/templates/customer-support/config.yaml").read().split("---", 1)[1])
d["data"]["dataset_name_or_path"] ="forgelm/templates/customer-support/data.jsonl"ForgeConfig(**d) # loadsd["training"]["gradient_checkpointing"] =TrueForgeConfig(**d) # ValidationError: Extra inputs are not permitted
What to change. Reword item 2 so that it says:
templates cannot set gradient_checkpointing, because it is not a config field (TrainingConfig forbids unknown keys, so the config fails validation);
the trainer enables it automatically when CUDA is available (see forgelm/trainer.py).
Keep the rest of the item (QLoRA 4-bit NF4, rank ≤ 8, safety/compliance opt-in only). The maintainers have already decided that it stays a non-field (decision C-9 of Phase 16 step S8), so there is no choice left for you to make.
Please leave docs/guides/troubleshooting.md alone. It has a similar gradient_checkpointing: true snippet, but that is tracked separately and needs its Turkish mirror.
No new test is needed for a wording fix. The file is contributor-facing, so no CHANGELOG line is needed either. forgelm/templates/LICENSES.md has no Turkish mirror, so the issue's "Turkish mirror" line does not apply.
Open the PR against development with Fixes #271 (finding DOC-D4B02-005).
Hi! I’m a first-time contributor taking part in Hacktoberfest. I’d like to work on this docs fix. I’ll check the claim against forgelm/trainer.py, correct templates/LICENSES.md, and run the doc guard scripts before opening a PR. Could you assign it to me?
Activity
cemililik commentedon Oct 22, 2026
Where to start
Thanks for taking a look. Claim it by starting a comment with
/assignso nobody duplicates the work.What is wrong. Item 2 of "Adding a new template" in
forgelm/templates/LICENSES.md(about lines 30-34) says a template can rely on the trainer's default forgradient_checkpointingand "only set it explicitly when you need to override".forgelm/trainer.py, search for"gradient_checkpointing": torch.cuda.is_available()).TrainingConfighas no such field and rejects unknown keys. A template that sets it fails validation, andforgelm quickstartstops with a config error. You can see it yourself:What to change. Reword item 2 so that it says:
gradient_checkpointing, because it is not a config field (TrainingConfigforbids unknown keys, so the config fails validation);forgelm/trainer.py).Keep the rest of the item (QLoRA 4-bit NF4, rank ≤ 8, safety/compliance opt-in only). The maintainers have already decided that it stays a non-field (decision C-9 of Phase 16 step S8), so there is no choice left for you to make.
Please leave
docs/guides/troubleshooting.mdalone. It has a similargradient_checkpointing: truesnippet, but that is tracked separately and needs its Turkish mirror.No new test is needed for a wording fix. The file is contributor-facing, so no CHANGELOG line is needed either.
forgelm/templates/LICENSES.mdhas no Turkish mirror, so the issue's "Turkish mirror" line does not apply.Open the PR against
developmentwithFixes #271(findingDOC-D4B02-005).saipraneeth143 commentedon Oct 26, 2026
Hi! I’m a first-time contributor taking part in Hacktoberfest. I’d like to work on this docs fix. I’ll check the claim against forgelm/trainer.py, correct templates/LICENSES.md, and run the doc guard scripts before opening a PR. Could you assign it to me?