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 还没有评估数据。