How fused modules work in AutoAWQ
mainFused modules combine multiple layers into a single operation to increase efficiency. They are activated by setting fuse_layers=True during AutoAWQForCausalLM.from_quantized.
Important Constraints when using Fused Modules:
- Linux Only: The primary accelerator (FasterTransformer) is only compatible with Linux.
- Fixed Cache: A custom cache is used that preallocates based on
batch_sizeandmax_seq_len. You cannot change the sequence length after the model is created. - Initialization: Use
AutoAWQForCausalLM.from_quantized(max_seq_len=seq_len, batch_size=batch_size)to set these parameters. - Dummy Values: The
past_key_valuesreturned bymodel.generate()are dummy values and cannot be used for subsequent generation steps.