Skip to content
Prev Previous commit
fix pipeline
  • Loading branch information
stevhliu authored Apr 4, 2025
commit 2df01684a791aed3341f1038f8b527ae911d88b2
4 changes: 3 additions & 1 deletion docs/source/en/model_doc/distilbert.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ from transformers import pipeline

classifier = pipeline(
task="text-classification",
model="distilbert-base-uncased-finetuned-sst-2-english"
model="distilbert-base-uncased-finetuned-sst-2-english",
torch_dtype=torch.float16,
device=0
)

result = classifier("I love using Hugging Face Transformers!")
Expand Down