找出模型加载器里的 bug

来自 Hugging Face
Transformers 5.16.1 · huggingface_hub 1.30.0 · Python 3.14 进阶 4分钟 找出 1处问题

找出这段生成加载代码中的制品错配风险。

Python
from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(
    "acme/support-bert",
    revision="8f21c4",
)
model = AutoModel.from_pretrained("acme/support-bert")
encoded = tokenizer("Reset my password", return_tensors="pt")
result = model(**encoded)
在试验场中打开
报告错误