File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
backends/apple/coreml/recipes Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments