TRF068
_no_split_modules must only list classes that exist.
| Default | Enabled |
| Scope | All models |
| Source | mlinter/trf068.py |
| Show in terminal | mlinter --rule TRF068 |
What it does
Checks each _no_split_modules entry against the classes the modeling file defines or imports. A modular_*.py file is checked through the files it generates on disk, so regenerate before linting.
Why is this bad?
accelerate matches these names against submodule class names. A name that is not a class never matches, so the layer can be split across devices. It usually comes from a modular file inheriting _no_split_modules: the converter renames the prefix, not the class.
Example
class Qwen4ExpModel(Qwen3_5MoeModel):
- # inherits ["Qwen3_5MoeDecoderLayer"] -> converted to "Qwen4ExpDecoderLayer", which does not exist
+ _no_split_modules = ["Qwen4ExpTextDecoderLayer"]
Suppressing this rule
Add a # trf-ignore: TRF068 comment on the flagged line or the line directly above it. See Suppressing rules for whole-file directives and when a suppression is the wrong answer.
Allowlisted models
1 model are exempt from TRF068 in mlinter/rules.toml, because they predate the convention and cannot be changed without breaking backward compatibility.
Show the 1 allowlisted model
esm
