Skip to content

llmcompressor.modifiers.transform.spinquant.norm_mappings

NormMapping

Bases: BaseModel

SpinQuant needs to know where every norm layer exists in the model, as well as all the subsequent Linear layers the norm passes into. This is because the norm layer weights need to normalized before transforms can be fused into Linear layers.

Parameters:

  • norm

    name or regex that matches norm layer in model

  • linears

    list of names or regexes of Linear layers that receive input from norm.