Update README.md
Browse files
README.md
CHANGED
@@ -7,6 +7,7 @@ base_model:
|
|
7 |
|
8 |
Bitsandbytes quantization of https://huggingface.co/bigcode/starcoder2-3b. See https://huggingface.co/blog/4bit-transformers-bitsandbytes for instructions.
|
9 |
|
|
|
10 |
from transformers import AutoModelForCausalLM
|
11 |
from transformers import BitsAndBytesConfig
|
12 |
import torch
|
@@ -18,4 +19,5 @@ nf4_config = BitsAndBytesConfig(
|
|
18 |
bnb_4bit_compute_dtype=torch.bfloat16
|
19 |
)
|
20 |
model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder2-3b", quantization_config=nf4_config)
|
21 |
-
model.push_to_hub("onekq-ai/starcoder2-3b-bnb-4bit")
|
|
|
|
7 |
|
8 |
Bitsandbytes quantization of https://huggingface.co/bigcode/starcoder2-3b. See https://huggingface.co/blog/4bit-transformers-bitsandbytes for instructions.
|
9 |
|
10 |
+
```python
|
11 |
from transformers import AutoModelForCausalLM
|
12 |
from transformers import BitsAndBytesConfig
|
13 |
import torch
|
|
|
19 |
bnb_4bit_compute_dtype=torch.bfloat16
|
20 |
)
|
21 |
model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder2-3b", quantization_config=nf4_config)
|
22 |
+
model.push_to_hub("onekq-ai/starcoder2-3b-bnb-4bit")
|
23 |
+
```
|