Skip to content

Commit 23bec59

Browse files
committed
up
1 parent be95023 commit 23bec59

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

examples/apple/coreml/llama/export.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,6 @@ def main() -> None:
148148
lambda m, fqn: isinstance(m, torch.nn.Embedding),
149149
)
150150

151-
# CoreML's op_linear_quantizer_config appears to have a bug where the quantization
152-
# quality is subpar. We use torchao APIs instead, which are now supported by CoreML
153-
op_linear_quantizer_config = None
154-
# op_linear_quantizer_config = {
155-
# "mode": "linear_symmetric",
156-
# "dtype": "int4",
157-
# "granularity": "per_channel",
158-
# }
159-
160151
if export_args.coreml_quantize == "b4w":
161152
quantize_(
162153
model,
@@ -182,7 +173,6 @@ def main() -> None:
182173
}[float_dtype],
183174
compute_unit=ct.ComputeUnit.CPU_AND_NE,
184175
model_type=CoreMLBackend.MODEL_TYPE.MODEL, # pyre-fixme[16]
185-
op_linear_quantizer_config=op_linear_quantizer_config,
186176
)
187177
partitioner = CoreMLPartitioner( # pyre-fixme[16]
188178
compile_specs=compile_specs,
@@ -214,7 +204,7 @@ def main() -> None:
214204
ep,
215205
partitioner=[partitioner],
216206
compile_config=EdgeCompileConfig(
217-
_check_ir_validity=False,
207+
# TODO: fix lowering when dim_order is enabled
218208
_skip_dim_order=True,
219209
),
220210
)

0 commit comments

Comments
 (0)