Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: gemma
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
library_name: transformers
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# Gemma 2 9B 8-bit
|
| 7 |
+
This is an 8-bit quantized version of [Gemma 2 9B](https://huggingface.co/google/gemma-2-9b). __**The models belong to Google and are licensed under the Gemma Terms of Use**__ and are only stored in quantized form here for convenience.
|
| 8 |
+
|
| 9 |
+
## How to use
|
| 10 |
+
|
| 11 |
+
```python
|
| 12 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 13 |
+
import torch
|
| 14 |
+
dtype = torch.float16
|
| 15 |
+
model = AutoModelForCausalLM.from_pretrained("nev/gemma-2-9b-8bit", torch_dtype=dtype, device_map="auto")
|
| 16 |
+
tokenizer = AutoTokenizer.from_pretrained("nev/gemma-2-9b-8bit")
|
| 17 |
+
```
|