Files
DeepSpeed/docs
Masahiro Tanaka 7d9a2f2bf3 Improve leaf module interface (enable via config, relax matching criteria, add document, etc.) (#7604)
This PR improves the usability of the leaf module feature.

Here are the changes:
- Allow enabling the leaf module via both the DeepSpeed config and APIs.
- Relax matching criteria to support class-based matching.
- Support multiple ways of specifying the target module: class, class
name (with or without package name), module name, or suffix.
- Add documentation to the training guide, including config snippets and
explanations of default behavior.
- Add default classes (e.g., Mixtral, Qwen2/Qwen3) that automatically
enable the leaf module feature. (Welcoming requests to add more classes)

---------

Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
2025-10-03 09:45:28 +00:00
..
2025-07-23 12:33:23 -07:00
2025-02-05 00:56:50 +00:00
2024-09-04 15:31:31 +00:00
2023-09-18 22:16:08 +00:00
2020-03-17 13:49:48 -07:00
2025-02-05 12:16:37 -08:00
2024-08-05 08:51:26 -07:00
2024-08-05 08:51:26 -07:00

DeepSpeed Documentation

This directory includes the source code for the website and documentation of DeepSpeed. The code-docs/ directory is used to build deepspeed.readthedocs.io.

deepspeed.ai is the recommended way to read all DeepSpeed documentation. Directly viewing the Markdown files in this directory will not include images and other features.

Building the documentation locally

You can serve the DeepSpeed website locally. This is especially useful for development.

Prerequisites

The DeepSpeed website relies on Jekyll. There are several guides for installation. The instructions below assume you are in an Ubuntu environment and have been tested on WSL.

First ensure that you have the necessary packages (e.g., make and zlib).

sudo apt-get install build-essential zlib1g-dev ruby-full

Add these lines to your .bashrc or equivalent to ensure you have permissions to install Ruby packages without sudo.

export GEM_HOME="$HOME/gems"
export PATH="$HOME/gems/bin:$PATH"

Don't forget to source ~/.bashrc afterward 😊.

Now we can install Jekyll and Bundler:

gem install jekyll bundler

Start a local webserver

We now need to install the required Ruby packages for the website.

NOTE: you should change to this folder (i.e., docs) before running the installation command to avoid this error:

Could not locate Gemfile

NOTE: This step frequently hangs when connected to a VPN (including MSVPN). Simply disconnect for the package installation.

bundle install

Depending on your environment, you may need to add webrick to avoid the following error:

gems/gems/jekyll-3.9.5/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)

bundle add webrick

You can now start a local webserver via:

bundle exec jekyll serve

The website should now be accessible at http://localhost:4000

Update the Readthedocs.io API documentation

Use the following steps to update the public API documentation.

  1. Make your documentation changes and push them to the rtd-staging branch. This will rebuild the docs in the staging branch. NOTE: It is acceptable to force push to this branch to overwrite previous changes.
  2. View the result of the result of the build here
  3. Once the build is complete view the newly modified API documentation here
  4. Once you are satisfied with the changes create a new branch off of rtd-staging to push into master.