fix: actually quantize model with quantize_4bit()
This commit is contained in:
@@ -248,6 +248,12 @@ def test_strategy_6():
|
||||
model,
|
||||
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("\n Step 3: Move to GPU 0...")
|
||||
|
||||
Reference in New Issue
Block a user