From 3c7a8070de97ec2d3d2760e4c3560a91998d8b60 Mon Sep 17 00:00:00 2001 From: kaibioinfo Date: Wed, 7 Aug 2024 14:47:14 +0200 Subject: [PATCH] fix: fix a bug that prevents specifying include patterns for quantifying --- optimum/quanto/quantize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimum/quanto/quantize.py b/optimum/quanto/quantize.py index 05e9af11..c4c652d7 100644 --- a/optimum/quanto/quantize.py +++ b/optimum/quanto/quantize.py @@ -87,7 +87,7 @@ def quantize( any patterns from the denylist. """ if include is not None: - include = [include] if isinstance(include, str) else exclude + include = [include] if isinstance(include, str) else include if exclude is not None: exclude = [exclude] if isinstance(exclude, str) else exclude for name, m in model.named_modules():