Skip to content

Commit 2badd76

Browse files
cccclaifacebook-github-bot
authored andcommitted
Switch the order of the to_dtype function and source transform (#3757)
Summary: Pull Request resolved: #3757 We're running quantization during source transform and some quantization infra doesn't support bf16 yet. Move to_dtype one stage earlier so we can choose the dtype fp32 before running quantization transform. ghstack-source-id: 228125529 Reviewed By: shoumikhin Differential Revision: D57883363 fbshipit-source-id: d74f9b6de09762c5412b48feb16c60abbcc3f9f8
1 parent fbbba34 commit 2badd76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/models/llama2/export_llama_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,8 @@ def _prepare_for_llama_export(modelname: str, args) -> LlamaEdgeManager:
374374
)
375375
.set_output_dir(output_dir_path)
376376
.set_metadata(args.metadata)
377-
.source_transform(transforms)
378377
.to_dtype(dtype_override)
378+
.source_transform(transforms)
379379
)
380380

381381

0 commit comments

Comments
 (0)