소스 검색

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