Skip to content

Commit

Permalink
Fix (example/llm): Add all rewriters to the list (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfraser authored May 23, 2024
1 parent eeffd2b commit b535615
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def replace_mha_with_quantizable_layers(model, dtype):
for src_module, (quantizable_module, quantizable_module_kwargs) in QUANTIZABLE_MHA_MAP.items():
rewriter = ModuleToModuleByClass(
src_module, quantizable_module, **quantizable_module_kwargs, dtype=dtype)
rewriters.append(rewriter)
rewriters.append(rewriter)
if not rewriters:
warnings.warn(
f"No module to replace was found. Supported modules are {list(QUANTIZABLE_MHA_MAP.keys())}"
Expand Down

0 comments on commit b535615

Please sign in to comment.