Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,36 @@
|
|
1 |
---
|
2 |
license: cc-by-sa-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc-by-sa-4.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
library_name: transformers
|
6 |
+
pipeline_tag: text-generation
|
7 |
+
tags:
|
8 |
+
- stableLM
|
9 |
+
- sharded
|
10 |
---
|
11 |
+
|
12 |
+
|
13 |
+
# StableLM-Base-Alpha: sharded checkpoint
|
14 |
+
|
15 |
+
This is a sharded checkpoint (with ~2GB shards) of the model. Refer to the [original model](https://huggingface.co/stabilityai/stablelm-base-alpha-3b) for all details.
|
16 |
+
|
17 |
+
|
18 |
+
## Basic Usage
|
19 |
+
|
20 |
+
|
21 |
+
install `transformers`, `accelerate`, and `bitsandbytes`.
|
22 |
+
|
23 |
+
```bash
|
24 |
+
pip install -U -q transformers bitsandbytes accelerate
|
25 |
+
```
|
26 |
+
|
27 |
+
Load the model in 8bit, then [run inference](https://huggingface.co/docs/transformers/generation_strategies#contrastive-search):
|
28 |
+
|
29 |
+
```python
|
30 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
31 |
+
|
32 |
+
model_name = "ethzanalytics/stablelm-tuned-alpha-3b-sharded"
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
34 |
+
|
35 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, load_in_8bit=True)
|
36 |
+
```
|