Bläddra i källkod

fix: do not set the weight to fp8 for fp16 checkpoints

AlpinDale 7 månader sedan
förälder
incheckning
d7c0dd5b50
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      aphrodite/modeling/models/mixtral.py

+ 1 - 1
aphrodite/modeling/models/mixtral.py

@@ -93,7 +93,7 @@ class MixtralMoE(nn.Module):
                                      params_dtype=self.params_dtype,
                                      quant_config=None)
 
-        if self.use_fp8:
+        if self.use_fp8 and self.quant_config.is_checkpoint_fp8_serialized:
             params_dtype = torch.float8_e4m3fn
 
         self.w13_weight = nn.Parameter(