2.4K Star 8.2K Fork 4.4K

GVPMindSpore / mindspore

 / 详情

[ST][MS][mindie]do_sample=true,top_k不配置,mindie报错,服务退出

TODO
Bug-Report 成员
创建于  
2024-05-18 18:33
name about labels
Bug Report Use this template for reporting a bug kind/bug

Describe the current behavior / 问题描述 (Mandatory / 必填)

mindie请求do_sample=true,tok不配置,mindie报错,服务退出
报错如下:
[Model] >>> Exception:top_k has to be a strictly positive integer, but is 0
Traceback (most recent call last):
File "/usr/local/python3.9.5/lib/python3.9/site-packages/model_wrapper/standard_model.py", line 47, in generate
request_tokens_np, eos_np = self.model.handle_requests(requests, is_prefill)
File "/usr/local/python3.9.5/lib/python3.9/site-packages/model_wrapper/utils/mf_wrapper.py", line 241, in handle_requests
tokens, eos_np = self.generate_token(requests, block_tables, is_prefill, metadata)
File "/usr/local/python3.9.5/lib/python3.9/site-packages/model_wrapper/utils/mf_wrapper.py", line 212, in generate_token
next_tokens, _ = self.model_runner.forward(input_ids=input_ids,
File "/home/jenkins0/ya/mindformers-dev/mindformers/model_runner.py", line 190, in forward
logits_warper = self.model.get_logits_warper(self.generation_config)
File "/home/jenkins0/ya/mindformers-dev/mindformers/generation/text_generator.py", line 238, in get_logits_warper
warpers.append(TopKLogitsWarper(top_k=generation_config.top_k, min_tokens_to_keep=min_tokens_to_keep))
File "/home/jenkins0/ya/mindformers-dev/mindformers/generation/logits_process.py", line 214, in init
raise ValueError(
ValueError: top_k has to be a strictly positive integer, but is 0

Environment / 环境信息 (Mandatory / 必填)

  • Hardware Environment(Ascend/GPU/CPU) / 硬件环境:

Please delete the backend not involved / 请删除不涉及的后端:
/device ascend 910b3

  • Software Environment / 软件环境 (Mandatory / 必填):
    -- MindSpore version (e.g., 1.7.0.Bxxx) :mindspore 2.3.0 .B521
    -- Python version (e.g., Python 3.7.5) :
    -- OS platform and distribution (e.g., Linux Ubuntu 16.04):
    -- GCC/Compiler version (if compiled from source):

  • Excute Mode / 执行模式 (Mandatory / 必填)(PyNative/Graph):

Please delete the mode not involved / 请删除不涉及的模式:
/mode pynative
/mode graph

Related testcase / 关联用例 (Mandatory / 必填)

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

  1. 拉起mindie服务
  2. 发送请求,do_sample=true,tok不配置

Describe the expected behavior / 预期结果 (Mandatory / 必填)

Related log / screenshot / 日志 / 截图 (Mandatory / 必填)

Special notes for this issue/备注 (Optional / 选填)

评论 (3)

Ai122 创建了Bug-Report
Ai122 添加了
 
kind/bug
标签
Ai122 添加了
 
sig/parallel
标签
Ai122 添加了
 
attr/function
标签
Ai122 添加了
 
stage/func-debug
标签
Ai122 添加了
 
master
标签
Ai122 添加协作者wangxingyan
展开全部操作日志

Please assign maintainer to check this issue.
请为此issue分配处理人。
@Ai122

感谢您的提问,您可以评论//mindspore-assistant更快获取帮助:

  1. 如果您刚刚接触MindSpore,或许您可以在教程找到答案
  2. 如果您是资深Pytorch用户,您或许需要:
  1. 如果您遇到动态图问题,可以设置set_context(pynative_synchronize=True)查看报错栈协助定位
  2. 模型精度调优问题可参考官网调优指南
  3. 如果您反馈的是框架BUG,请确认您在ISSUE中提供了MindSpore版本、使用的后端类型(CPU、GPU、Ascend)、环境、训练的代码官方链接以及可以复现报错的代码的启动方式等必要的定位信息
  4. 如果您已经定位出问题根因,欢迎提交PR参与MindSpore开源社区,我们会尽快review
Ai122 移除了
 
sig/parallel
标签
Ai122 移除了
 
sig/parallel
标签
Ai122 里程碑B-SIG-Parallel 修改为B-SIG-MSLite
Ai122 添加了
 
sig/mslite
标签
wangxingyan 添加了
 
device/ascend
标签
wangxingyan 修改了标题
i-robot 添加了
 
gitee
标签
fangwenyi 添加了关联分支master 选项
fangwenyi 添加了问题后端类型Ascend 选项

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore

搜索帮助

344bd9b3 5694891 D2dac590 5694891