nicholascao
commited on
Commit
·
374f6d1
1
Parent(s):
70e4cca
Update README.md
Browse files
README.md
CHANGED
@@ -35,8 +35,11 @@ See [Github](https://github.com/NicholasCao/ChatBloom) for details.
|
|
35 |
|
36 |
## Usage
|
37 |
```python
|
|
|
|
|
|
|
38 |
tokenizer = AutoTokenizer.from_pretrained('nicholascao/chatbloom-1b7-sft')
|
39 |
-
model = AutoModelForCausalLM.from_pretrained('nicholascao/chatbloom-1b7-sft')
|
40 |
generation_config = GenerationConfig.from_pretrained('nicholascao/chatbloom-1b7-sft')
|
41 |
|
42 |
inputs = tokenizer('<Human>: Hello <eoh> <Assistant>: ', return_tensors='pt').to(torch.cuda.current_device())
|
|
|
35 |
|
36 |
## Usage
|
37 |
```python
|
38 |
+
import torch
|
39 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
|
40 |
+
|
41 |
tokenizer = AutoTokenizer.from_pretrained('nicholascao/chatbloom-1b7-sft')
|
42 |
+
model = AutoModelForCausalLM.from_pretrained('nicholascao/chatbloom-1b7-sft').half()
|
43 |
generation_config = GenerationConfig.from_pretrained('nicholascao/chatbloom-1b7-sft')
|
44 |
|
45 |
inputs = tokenizer('<Human>: Hello <eoh> <Assistant>: ', return_tensors='pt').to(torch.cuda.current_device())
|