fix: actually quantize model with quantize_4bit()
This commit is contained in:
1 parent
aff91c990b
commit
e2b351e04c
1 file changed
+6
@@ -248,6 +248,12 @@ def test_strategy_6():
|
|||||||
model,
|
model,
|
||||||
use_gradient_checkpointing=False,
|
use_gradient_checkpointing=False,
|
||||||
)
|
)
|
||||||
|
print(" ✓ Model prepared for k-bit training")
|
||||||
|
|
||||||
|
# Actually quantize the model
|
||||||
|
from bitsandbytes.nn.modules import Params4bit
|
||||||
|
print(" Quantizing weights to 4-bit...")
|
||||||
|
model.quantize_4bit()
|
||||||
print(" ✓ Model quantized to 4-bit (~17.5GB)")
|
print(" ✓ Model quantized to 4-bit (~17.5GB)")
|
||||||
|
|
||||||
print("\n Step 3: Move to GPU 0...")
|
print("\n Step 3: Move to GPU 0...")
|
||||||
|
|||||||
Reference in new issue
Block a user