Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/axolotl/utils/schemas/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ class ModelInputConfig(BaseModel):
)

experimental_skip_move_to_device: bool | None = Field(
default=None,
default=True,
json_schema_extra={
"description": "Don't move the model to the device before sharding. "
"This is an experimental feature that may be included in the future as the default."
"description": "Don't move the model to the device before sharding. Set to `false` to revert to legacy behavior."
},
)
Comment on lines 67 to 72

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Default flip to True changes behavior; verify call sites and docs

Changing default to True modifies runtime behavior for users who relied on the implicit legacy default. Ensure:

  • All call sites treat None and True consistently.
  • Docs/changelogs communicate the new default and how to revert (set to false).

Run this script to locate references and any docs mentioning this flag or its default:

I can help generate a short “Migration note” snippet for the docs if you want.


🏁 Script executed:

#!/bin/bash
# Find all code usages
rg -n -C2 --type=py '\bexperimental_skip_move_to_device\b'

# Find mentions in docs and examples (may include README/markdown/yaml)
rg -n -C2 '(experimental_skip_move_to_device|skip_move_to_device)' -g '!**/node_modules/**'

Length of output: 7356


Document and Align Examples with New Default for experimental_skip_move_to_device

The default for experimental_skip_move_to_device has been flipped to True, which now forces skip_move_to_device=True in all cases unless explicitly set to False. This silently changes device-placement behavior for existing users.

Please ensure:

  • Loader logic in
    src/axolotl/utils/schemas/model.py:67–72 (default=True)
    src/axolotl/loaders/model.py:827–830 (override when not None)
    correctly reflects this intent.
  • All example configs in examples/gpt-oss/*.yaml either:
    • Remove experimental_skip_move_to_device: true (since it’s now the default), or
    • Explicitly set it to false where legacy behavior is required.
  • Documentation and changelog include a Migration Note such as:
    experimental_skip_move_to_device now defaults to True. Set it to false to retain legacy behavior (moving the model to the device before sharding).”

Let me know if you’d like a draft of the migration snippet!

🤖 Prompt for AI Agents
In src/axolotl/utils/schemas/model.py around lines 67–72 and
src/axolotl/loaders/model.py around lines 827–830, the default for
experimental_skip_move_to_device has been flipped to True which changes runtime
behavior; update the loader so it treats None as "use default True" and only
applies an override when the value is explicitly False (i.e., ensure logic sets
skip_move_to_device=True by default and only sets it to False if config
explicitly contains False), update all example configs under examples/gpt-oss/
to remove explicit experimental_skip_move_to_device: true or set
experimental_skip_move_to_device: false where legacy behavior is required, and
add a Migration Note to the docs/changelog stating that
experimental_skip_move_to_device now defaults to True and instructing users to
set it to false to retain legacy behavior.


Expand Down