File size: 834 Bytes
f00739d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c25e831
 
 
f00739d
 
 
 
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
32
---
license: llama2
train: false
inference: false
pipeline_tag: text-generation
---

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

To run the model, install the HQQ library from https://github.com/mobiusml/hqq/tree/main/code and load it as follows:
``` Python
from hqq.models.llama  import LlamaHQQ
import transformers

model_id = 'mobiuslabsgmbh/Llama-2-7b-hf-4bit_g64-HQQ'
#Load the tokenizer
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
#Load the model
model = LlamaHQQ.from_quantized(model_id)
```

You can then use the model for text generation or to reproduce the benchmark numbers. 

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