File size: 888 Bytes
d30b9ca
 
510d225
 
 
d30b9ca
510d225
 
fbb3ba7
510d225
1edf17f
 
eb890c7
 
2e67008
eb890c7
 
 
 
 
510d225
 
7504a4c
 
 
 
510d225
 
 
 
27363e6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
license: llama2
train: false
inference: false
pipeline_tag: text-generation
---

## Llama-2-13b-hf-4bit_g64-HQQ
This is a version of the LLama-2-13B-hf model quantized to 4-bit via Half-Quadratic Quantization (HQQ): https://mobiusml.github.io/hqq_blog/

This model matches the quality of AWQ (same perplexity) but didn't use any data for calibration. 

To run the model, install the HQQ library:
```
#This model is deprecated and requires older versions
pip install hqq==0.1.8
pip install transformers==4.46.0
```
and use it as follows:

``` Python
model_id = 'mobiuslabsgmbh/Llama-2-13b-hf-4bit_g64-HQQ'

from hqq.engine.hf import HQQModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)
model     = HQQModelForCausalLM.from_quantized(model_id)
```

*Limitations*: <br>
-Only supports single GPU runtime.<br>
-Not compatible with HuggingFace's PEFT.<br>