bitorch_engine.utils.model_helper.update_zeros

bitorch_engine.utils.model_helper.update_zeros(qweight, w, norm_grad, step_size, z_unpacked=None)[source]

Updates the zeros attribute of the qweight object based on its layer type.

Parameters:
  • qweight – An object containing quantization parameters, including the zeros attribute.

  • w – Weight tensor.

  • norm_grad – Normalized gradient tensor.

  • step_size – Step size for updating zeros.

  • z_unpacked – Optional unpacked zeros tensor for specific layer types.