Skip to content

Commit e7d03ad

Browse files
authored
switch to dtype instead of torch_dtype
Following this: huggingface#39782
1 parent 864c4dd commit e7d03ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/en/model_doc/apertus.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ from transformers import pipeline
4242
pipeline = pipeline(
4343
task="text-generation",
4444
model="swiss-ai/Apertus-8B",
45-
torch_dtype=torch.bfloat16,
45+
dtype=torch.bfloat16,
4646
device=0
4747
)
4848
pipeline("Plants create energy through a process known as")
@@ -60,7 +60,7 @@ tokenizer = AutoTokenizer.from_pretrained(
6060
)
6161
model = AutoModelForCausalLM.from_pretrained(
6262
"swiss-ai/Apertus-8B",
63-
torch_dtype=torch.bfloat16,
63+
dtype=torch.bfloat16,
6464
device_map="auto",
6565
attn_implementation="sdpa"
6666
)

0 commit comments

Comments
 (0)