Update README.md

This commit is contained in:
Junyang Lin
2023-08-03 20:58:22 +08:00
committed by GitHub
parent 81288c389a
commit 8ced635b22

View File

@@ -159,8 +159,12 @@ print(f'Response: {response}')
## Quantization
To load the model in lower precision, e.g., 4 bits and 8 bits, we provide examples to show how to load by adding quantization configuration:
We provide examples to show how to load models in `NF4` and `Int8`. For starters, make sure you have implemented `bitsandbytes`.
```
pip install bitsandbytes
```
Then you only need to add your quantization configuration to `AutoModelForCausalLM.from_pretrained`. See the example below:
```python
from transformers import BitsAndBytesConfig