Skip to content

Commit 0e422bf

Browse files
Update
[ghstack-poisoned]
1 parent 1137ee9 commit 0e422bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/apple/coreml/recipes/coreml_recipe_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def _build_torchao_quantized_recipe(
276276
else:
277277
weight_granularity = PerGroup(group_size=group_size)
278278

279-
# Use user-provided filter_fn or default to Linear/Embedding layers
279+
# Use user-provided filter_fn if provided
280280
filter_fn = kwargs.get("filter_fn", None)
281281
config = AOQuantizationConfig(
282282
ao_base_config=IntxWeightOnlyConfig(
@@ -327,7 +327,7 @@ def _build_codebook_quantized_recipe(
327327
# Use user-provided filter_fn or default to Linear/Embedding layers
328328
filter_fn = kwargs.get(
329329
"filter_fn",
330-
lambda m, _: (
330+
lambda m, fqn: (
331331
isinstance(m, torch.nn.Embedding) or isinstance(m, torch.nn.Linear)
332332
),
333333
)

0 commit comments

Comments
 (0)