Repository navigation
docs(deepspeed): say that the preset names work only from a source checkout #994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,7 +49,16 @@ torchrun --nproc_per_node=4 -m forgelm.cli --config my_config.yaml | |
|
|
||
| ## DeepSpeed Configuration | ||
|
|
||
| ForgeLM provides three built-in DeepSpeed presets. Set `deepspeed_config` to one of these names, or provide a path to your own JSON file. | ||
| The repository ships three DeepSpeed presets under `configs/deepspeed/`. Set `deepspeed_config` to one of their names, or provide a path to your own JSON file. | ||
|
|
||
| **The preset names work only from a source checkout.** They resolve to `configs/deepspeed/<name>.json` beside the | ||
| installed package or in the current directory. A `pip install forgelm` wheel and the Docker image do not contain those | ||
| files, so there a preset name fails with a configuration error (exit 1). Copy the JSON files from the repository's | ||
| `configs/deepspeed/` folder, or write your own, and set `deepspeed_config` to its path. | ||
|
|
||
| **Known issue ([#410](https://github.com/HodeTech/ForgeLM/issues/410)):** the `zero2` preset, which is also used when | ||
| `deepspeed_config` is unset, sets `allgather_bucket_size` to `"auto"`, a value transformers' DeepSpeed integration does | ||
| not fill in, so a ZeRO-2 run with it aborts. Use your own ZeRO-2 JSON until that is fixed. | ||
|
Comment on lines
+59
to
+61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: nl -ba docs/reference/distributed_training.md | sed -n '1,140p'; printf '%s\n' '---'; rg -n -F --glob '*.md' -e 'deepspeed_config' -e 'zero2' docs || trueRepository: HodeTech/ForgeLM Length of output: 15311 🏁 Script executed: git diff --name-status 56b4f0d599a07f0d477104c78d5079db1a6cca31 16ba7247fcbfcab546daab8ba3b9175c30a04aa4 -- docs; printf '%s\n' '---'; git diff --unified=5 56b4f0d599a07f0d477104c78d5079db1a6cca31 16ba7247fcbfcab546daab8ba3b9175c30a04aa4 -- docs/reference/distributed_training.md docs/reference/distributed_training-tr.md docs/guides/troubleshooting.md docs/guides/troubleshooting-tr.md; printf '%s\n' '---'; nl -ba docs/guides/troubleshooting.md | sed -n '120,136p'; nl -ba docs/guides/troubleshooting-tr.md | sed -n '124,139p'; nl -ba docs/reference/distributed_training-tr.md | sed -n '16,28p']Repository: HodeTech/ForgeLM Length of output: 7594 Keep active examples consistent with the The Quick Start example still sets Keep the source-checkout path in the “config not found” troubleshooting example because it documents a valid source-checkout workflow. Issue 🤖 Prompt for AI Agents |
||
|
|
||
| ### Presets | ||
|
|
||
|
|
@@ -64,8 +73,8 @@ ForgeLM provides three built-in DeepSpeed presets. Set `deepspeed_config` to one | |
| ```yaml | ||
| distributed: | ||
| strategy: "deepspeed" | ||
| deepspeed_config: "zero2" # Preset name | ||
| # deepspeed_config: "./my_ds_config.json" # Or custom path | ||
| deepspeed_config: "./my_ds_config.json" # Path to your own JSON (works on every install) | ||
| # deepspeed_config: "zero2" # Preset name: source checkout only | ||
| ``` | ||
|
|
||
| ### ZeRO Stage Comparison | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ ZeRO-2 shards the optimiser state (the heaviest VRAM component for adaptive opti | |
| ```yaml | ||
| distributed: | ||
| strategy: "deepspeed" | ||
| deepspeed_config: "zero2" # preset name (or a filesystem path to a DeepSpeed JSON) | ||
| deepspeed_config: "./ds_zero2.json" # a filesystem path to a DeepSpeed JSON (preset names such as "zero2" need a source checkout) | ||
|
|
||
| training: | ||
| gradient_accumulation_steps: 4 | ||
|
|
@@ -95,7 +95,7 @@ training: | |
| gradient_accumulation_steps: 8 | ||
| ``` | ||
|
|
||
| The `zero3_offload` preset fits 70B on 8×24 GB by offloading optimiser state and parameters to CPU. ZeRO-Infinity's NVMe offload isn't a built-in preset — point `deepspeed_config` at a custom DeepSpeed JSON with `offload_param`/`offload_optimizer` set to `device: nvme` for that case. | ||
| The `zero3_offload` preset offloads optimiser state and parameters to CPU, trading speed for GPU memory; whether a given model fits depends on your GPU memory and CPU RAM. The preset names `zero2`, `zero3` and `zero3_offload` resolve only from a source checkout (the JSON files live in the repository's `configs/deepspeed/` folder, not in the pip wheel or the Docker image), and the `zero2` preset is currently broken ([#410](https://github.com/HodeTech/ForgeLM/issues/410)), so give `deepspeed_config` the path of a JSON file you control. ZeRO-Infinity's NVMe offload isn't a preset — point `deepspeed_config` at a custom DeepSpeed JSON with `offload_param`/`offload_optimizer` set to `device: nvme` for that case. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use a JSON path in the active ZeRO-3 example. This paragraph says that preset files are absent from pip wheels and Docker images. Line 92 still enables 🧰 Tools🪛 LanguageTool[uncategorized] ~98-~98: Do not mix variants of the same word (‘optimizer’ and ‘optimiser’) within a single text. (EN_WORD_COHERENCY) 🤖 Prompt for AI Agents |
||
|
|
||
| | Model | GPUs | ZeRO-3 + offload? | | ||
| |---|---|---| | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Rewrite this as a user-facing changelog entry.
The entry begins with the instruction “Say that...” and lists edited files, template details, and issue bookkeeping. State the released behavior directly. Remove the file inventory and implementation details.
As per coding guidelines: Every changelog entry is user-facing.
🤖 Prompt for AI Agents
Source: Coding guidelines