example produces an error
- 主要語言
- TeX
- 星號
- 90
- 分支
- 11
- PR 合併指標
- 30 天內沒有已合併 PR
描述
your input:
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("allenai/bhaskara")
model.generate("Question: What is the square root of 15?\nAnswer:")
Output:
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.
Traceback (most recent call last):
File "C:\", line 3, in
model.generate("Question: What is the square root of 15?\nAnswer:")
File "C:\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "C:\lib\site-packages\transformers\generation\utils.py", line 1341, in generate
batch_size = inputs_tensor.shape[0]
AttributeError: 'str' object has no attribute 'shape'
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。