Spaces:
Paused
Paused
Update utils.py
Browse files
utils.py
CHANGED
@@ -334,5 +334,17 @@ def daten_laden(name):
|
|
334 |
return
|
335 |
|
336 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
|
338 |
|
|
|
334 |
return
|
335 |
|
336 |
|
337 |
+
#Quantisation - tzo speed up training
|
338 |
+
def bnb_config (load4Bit, double_quant)
|
339 |
+
compute_dtype = getattr(torch, "float16")
|
340 |
+
bnb_config = BitsAndBytesConfig(
|
341 |
+
load_in_4bit= load4Bit,
|
342 |
+
bnb_4bit_quant_type="nf4",
|
343 |
+
bnb_4bit_compute_dtype=compute_dtype,
|
344 |
+
bnb_4bit_use_double_quant=double_quant,
|
345 |
+
)
|
346 |
+
return bnb_config
|
347 |
+
|
348 |
+
|
349 |
|
350 |
|