allenai / allenai/Lila

example produces an error

未关闭
#1 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。