Skip to content

Commit

Permalink
fix bug of FusedMoE object has no attribute w13_weight (#94)
Browse files Browse the repository at this point in the history
Signed-off-by: yuwenzho <[email protected]>
  • Loading branch information
yuwenzho authored Jan 5, 2025
1 parent 9ceb958 commit 370cc68
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import torch
import torch.nn as nn
import types

from .quant_config import QuantMode, get_hqt_config, ScaleFormat
from .._core.quant_dequant import QuantDequant as qdq
Expand Down Expand Up @@ -294,6 +295,8 @@ def __init__(self, mod, mod_extra_config, *args, **kwargs):
if self.quantization_mode in [QuantMode.QUANTIZE, QuantMode.LOAD]:
delattr(mod, "w13_weight")
delattr(mod, "w2_weight")
setattr(mod, "w13_weight", None)
setattr(mod, "w2_weight", None)
setattr(self, "w13_weight", None)
setattr(self, "w2_weight", None)
self.forward = self.forward_orig
Expand Down

0 comments on commit 370cc68

Please sign in to comment.