pszemraj commited on
Commit
e2be583
1 Parent(s): 9856e9f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -0
README.md CHANGED
@@ -1,3 +1,27 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+
5
+ # dolly-v2-7b: sharded checkpoint
6
+
7
+ This is a sharded checkpoint (with ~2GB shards) of the `databricks/dolly-v2-7b` model. Refer to the [original model](https://huggingface.co/databricks/dolly-v2-7b) for all details.
8
+
9
+ ## Basic Usage
10
+
11
+
12
+ install `transformers`, `accelerate`, and `bitsandbytes`.
13
+
14
+ ```bash
15
+ pip install -U -q transformers bitsandbytes accelerate
16
+ ```
17
+
18
+ Load the model in 8bit, then [run inference](https://huggingface.co/docs/transformers/generation_strategies#contrastive-search):
19
+
20
+ ```python
21
+ from transformers import AutoTokenizer, AutoModelForCausalLM
22
+
23
+ model_name = "ethzanalytics/dolly-v2-7b-sharded"
24
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
25
+
26
+ model = AutoModelForCausalLM.from_pretrained(model_name, load_in_8bit=True)
27
+ ```