• Benjamin Bossan's avatar
    FIX Make Int8Params deepcopy-able · ed99b3c1
    Benjamin Bossan authored
    This requires to implement the __deepcopy__ method in Int8Params.
    Moreover, there was an issue in the Linear8BitLT constructor that would
    assign instance attributes to the class, which is now fixed.
    
    Please review carefully that this does not impact existing code.
    
    Tests that I ran:
    
    - pytest tests/test_linear8bitlt.py
    - in PEFT: python -m pytest -m "single_gpu_tests and bitsandbytes" tests/test_gpu_examples.py
    - in PEFT: python -m pytest -m "single_gpu_tests and bitsandbytes" tests/test_common_gpu.py
    - in transformers: RUN_SLOW=1 python -m pytest tests/quantization/bnb -x
    ed99b3c1
test_linear8bitlt.py 8.41 KB