Skip to content

Commit 1f9a1c0

Browse files
committed
Switch the order of the to_dtype function and source transform
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: 228051128 Differential Revision: [D57883363](https://our.internmc.facebook.com/intern/diff/D57883363/)
1 parent bbc3e2a commit 1f9a1c0

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)