fix(README): remove trust_remote_code requirement from tokenizer snippet
This commit is contained in:
parent
a7a1fb8a83
commit
db5a120c4d
@ -30,7 +30,7 @@ Get started generating text with `Stable LM 2 1.6B` by using the following code
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-1_6b", trust_remote_code=True)
|
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-1_6b")
|
||||||
model = AutoModelForCausalLM.from_pretrained(
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
"stabilityai/stablelm-2-1_6b",
|
"stabilityai/stablelm-2-1_6b",
|
||||||
torch_dtype="auto",
|
torch_dtype="auto",
|
||||||
@ -54,7 +54,7 @@ print(tokenizer.decode(tokens[0], skip_special_tokens=True))
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-1_6b", trust_remote_code=True)
|
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-1_6b")
|
||||||
model = AutoModelForCausalLM.from_pretrained(
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
"stabilityai/stablelm-2-1_6b",
|
"stabilityai/stablelm-2-1_6b",
|
||||||
torch_dtype="auto",
|
torch_dtype="auto",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user