[BUG] RuntimeError: Unexpected model output: 26239
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 585
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
输入:
import bminf
cpm2 = bminf.models.CPM2()
result = cpm2.fill_blank("有一个服装品牌叫做<span>专门设计彩绘T恤",
top_p=0.5,
top_n=5,
temperature=0.5,
frequency_penalty=0,
presence_penalty=0
)
报错信息:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 6, in
presence_penalty=0
File "/usr/local/lib/python3.6/dist-packages/bminf/models/cpm2.py", line 252, in fill_blank
raise RuntimeError("Unexpected model output: %d" % token)
RuntimeError: Unexpected model output: 26239
请帮忙看看是什么原因
Environment:
python3.6
torch1.8.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided CPM2.fill_blank call in bminf/models/cpm2.py with Python 3.6 and torch 1.8.1. Inspect the handling around line 252, where token 26239 raises RuntimeError, and compare the returned token with the model's expected output. Done means the cause is confirmed and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100