dbaranchuk преди 3 години
родител
ревизия
02619d307d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/utils/convert_8bit.py

+ 2 - 2
src/utils/convert_8bit.py

@@ -1,5 +1,5 @@
-import torch
 import bitsandbytes as bnb
+import torch
 
 
 def replace_8bit_linear(model, threshold=6.0):
@@ -31,4 +31,4 @@ def replace_8bit_linear(model, threshold=6.0):
                 has_fp16_weights=False,
                 threshold=threshold,
             ).to(model._modules[n].weight.device)
-    return model
+    return model