quantized_weight_export#

Capture state for functional quantized-weight export.

Functions

capture_quantized_weight_export_state

Capture detached state for one weight, or None when it is not quantized.

get_quantized_weight_export_spec

Return stable deployment metadata without retaining quantizer tensors.

capture_quantized_weight_export_state(module, weight_name='weight', *, cpu=True)#

Capture detached state for one weight, or None when it is not quantized.

Parameters:
  • module (Module)

  • weight_name (str)

  • cpu (bool)

Return type:

_QuantizedWeightExportState | None

get_quantized_weight_export_spec(module, weight_name='weight')#

Return stable deployment metadata without retaining quantizer tensors.

Parameters:
  • module (Module)

  • weight_name (str)

Return type:

_QuantizedWeightExportSpec | None