Skip to content

Commit 23803a3

Browse files
[QAT Lora 6/N] torch.compile for reference implementation (#3343)
### Changes - Added `torch.compile` for `forward` & `backward` in reference implementation. ### Reason for changes - Training speed-up from 7 minutes to 5 minutes for 1 epoch of phi3.5 qat-lora tuning ### Related tickets - 163973 ### Tests - TBD
1 parent 5f4378e commit 23803a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nncf/torch/quantization/reference.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,5 @@ def tune_range(
121121

122122
class ReferenceQuantizedFunctions:
123123
_executor = ReferenceQuantize(backend_type=ReferenceBackendType.TORCH)
124-
Quantize_forward = _executor.forward
125-
Quantize_backward = _executor.backward
124+
Quantize_forward = torch.compile(_executor.forward)
125+
Quantize_backward = torch.compile(_executor.backward)

0 commit comments

Comments
 (0)