TRF001
Class-level config_class on <Model>PreTrainedModel should match <Model>Config naming.
| Default | Enabled |
| Scope | All models |
| Source | mlinter/trf001.py |
| Show in terminal | mlinter --rule TRF001 |
What it does
Checks naming consistency between <Model>PreTrainedModel and config_class.
Why is this bad?
Mismatched config_class can break loading, auto classes, and developer expectations.
Example
class AcmePreTrainedModel(PreTrainedModel):
- config_class = WileConfig
+ config_class = AcmeConfig
Suppressing this rule
Add a # trf-ignore: TRF001 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 TRF001 in mlinter/rules.toml, because they predate the convention and cannot be changed without breaking backward compatibility.
Show the 1 allowlisted model
qwen3_omni_moe
