Update README.md
Browse files
README.md
CHANGED
@@ -18,16 +18,16 @@ Please note the custom license from [the original](https://huggingface.co/01-ai/
|
|
18 |
```python
|
19 |
# !pip install -U -q transformers accelerate sentencepiece bitsandbytes
|
20 |
import torch
|
21 |
-
|
22 |
-
# Load model directly
|
23 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
24 |
|
25 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
|
|
|
|
26 |
model = AutoModelForCausalLM.from_pretrained(
|
27 |
"pszemraj/Yi-6B-200K-Llama-sharded", load_in_4bit=True
|
28 |
)
|
29 |
|
30 |
-
prompt = "Custom non-commercial licenses are just so fun, aren't they? The best thing about them is"
|
31 |
|
32 |
|
33 |
if torch.cuda.is_available():
|
|
|
18 |
```python
|
19 |
# !pip install -U -q transformers accelerate sentencepiece bitsandbytes
|
20 |
import torch
|
|
|
|
|
21 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
22 |
|
23 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
24 |
+
"pszemraj/Yi-6B-200K-Llama-sharded", use_fast=False
|
25 |
+
)
|
26 |
model = AutoModelForCausalLM.from_pretrained(
|
27 |
"pszemraj/Yi-6B-200K-Llama-sharded", load_in_4bit=True
|
28 |
)
|
29 |
|
30 |
+
prompt = "Custom non-commercial software licenses are just so fun, aren't they? The best thing about them is"
|
31 |
|
32 |
|
33 |
if torch.cuda.is_available():
|