Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Conversation

joey00072
Copy link

kernel is giving nan when activation are quantized in 8bit, adding way to optionally run quantize activations

  • activation quant range fix , -127, 128 => , -128, 127

Copy link
Contributor

@mlinmg mlinmg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit

def bitmat(W: torch.Tensor, X: torch.Tensor, scale_w) -> torch.Tensor:
return BitMat.apply(W, X, scale_w)
def bitmat(W: torch.Tensor, X: torch.Tensor, scale_w,quant_8bit_activations=None) -> torch.Tensor:
quant_8bit_activations = quant_8bit_activations if quant_8bit_activations is not None else BITMAT_QUANT_8BIT_ACTIVATIONS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that is is been passed as a env var

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants