瀏覽代碼

add bias :P

justheuristic 2 年之前
父節點
當前提交
4b18fc3cf0
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/petals/utils/convert_8bit.py

+ 1 - 0
src/petals/utils/convert_8bit.py

@@ -37,4 +37,5 @@ def replace_8bit_linear(model, threshold=6.0):
             model._modules[n].weight = bnb.nn.Int8Params(
                 module.weight.data, requires_grad=False, has_fp16_weights=False
             ).to(module.weight.dtype)
+            model._modules[n].bias = module.bias
     return model