You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comment in the linear function regarding weight.element_size() contains inaccuracies:
""" ... Notes: - If `weight` is quantized (e.g., `element_size() > 1`), a dequantized version is used for computation. ... """
This comment has two problems:
Incorrect "quantized" condition:element_size() > 1 indicates that the weight tensor is not quantized. Quantized tensors have an element size of 1, while higher precision formats like float32 and bfloat16 have element sizes greater than 1.
Misleading "dequantized version" phrase: The code does not perform any dequantization when weight.element_size() > 1. It directly uses the original weight tensor.
Proposed solution:
Change the comment to accurately reflect the code's logic. A more accurate comment would be:
""" ... Notes: - If `weight` is in a higher precision format (e.g., float32 or bfloat16), then `element_size() > 1`, and the original weight tensor is used for computation. ... """
This revised comment clarifies that no dequantization is performed and the original higher-precision weights are used directly when element_size() > 1.
The text was updated successfully, but these errors were encountered:
The comment in the
linear
function regardingweight.element_size()
contains inaccuracies:This comment has two problems:
Incorrect "quantized" condition:
element_size() > 1
indicates that theweight
tensor is not quantized. Quantized tensors have an element size of 1, while higher precision formats like float32 and bfloat16 have element sizes greater than 1.Misleading "dequantized version" phrase: The code does not perform any dequantization when
weight.element_size() > 1
. It directly uses the originalweight
tensor.Proposed solution:
Change the comment to accurately reflect the code's logic. A more accurate comment would be:
This revised comment clarifies that no dequantization is performed and the original higher-precision weights are used directly when
element_size() > 1
.The text was updated successfully, but these errors were encountered: