Update Readme.md
Browse files
README.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1 |
-
---
|
2 |
-
license: llama3.2
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: llama3.2
|
3 |
+
base_model:
|
4 |
+
- meta-llama/Llama-3.2-1B-Instruct
|
5 |
+
|
6 |
+
---
|
7 |
+
This model is a quantized version of Llama-3.2-1B-Instruct.
|
8 |
+
Code used for generation is as follows:
|
9 |
+
|
10 |
+
```python
|
11 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, GPTQConfig
|
12 |
+
import torch
|
13 |
+
|
14 |
+
model_id = "meta-llama/Llama-3.2-1B-Instruct"
|
15 |
+
|
16 |
+
quantization_config = GPTQConfig(
|
17 |
+
bits=4,
|
18 |
+
group_size=128,
|
19 |
+
dataset="c4",
|
20 |
+
desc_act=False,
|
21 |
+
)
|
22 |
+
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
24 |
+
quant_model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=quantization_config, device_map='auto')
|
25 |
+
```
|
26 |
+
|