pszemraj commited on
Commit
4d82a91
1 Parent(s): 7e9c80c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md CHANGED
@@ -1,3 +1,30 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+
5
+ # ethzanalytics/dolly-v2-7b-sharded-8bit
6
+
7
+ For more info on loading 8bit models, refer to the [example repo](https://huggingface.co/ybelkada/bloom-1b7-8bit) and/or the `4.28.0` [release info](https://github.com/huggingface/transformers/releases/tag/v4.28.0).
8
+
9
+ - total model size is only ~12.5 GB!
10
+ - this enables low-RAM loading, i.e. Colab :)
11
+
12
+ ## Basic Usage
13
+
14
+
15
+ install/upgrade `transformers`, `accelerate`, and `bitsandbytes`. For this to work **you must have** `transformers>=4.28.0` and `bitsandbytes>0.37.2`.
16
+
17
+ ```bash
18
+ pip install -U -q transformers bitsandbytes accelerate
19
+ ```
20
+
21
+ Load the model. As it is serialized in 8bit you don't need to do anything special:
22
+
23
+ ```python
24
+ from transformers import AutoTokenizer, AutoModelForCausalLM
25
+
26
+ model_name = "ethzanalytics/dolly-v2-7b-sharded-8bit"
27
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
28
+
29
+ model = AutoModelForCausalLM.from_pretrained(model_name)
30
+ ```