118 Star 820 Fork 474

MindSpore / mindformers

 / 详情

[CT][MF][PA] llama2 13B+PA + dynamic lite推理, 推理报错

DONE
Bug-Report
创建于  
2024-04-08 17:01
name about labels
Bug Report Use this template for reporting a bug kind/bug

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

llama2 13B+PA + dynamic,导出设置is_dynamic为true,推理也设置is_dynamic为true lite推理, 推理报错

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

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

Please delete the backend not involved / 请删除不涉及的后端:
/device ascend/GPU/CPU/kirin/等其他芯片

  • Software Environment / 软件环境 (Mandatory / 必填):
    -- MindSpore version (e.g., 1.7.0.Bxxx) :
    -- 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. 导出模型
    cd /home/workspace/lite_test/test_0328/MindFormers_Test/cases/llama2/13b/predict/test_mf_llama2_13b_predict_pa_1p_0001; python run_mindformer.py --config /home/workspace/lite_test/test_0328/MindFormers_Test/cases/llama2/13b/predict/test_mf_llama2_13b_predict_pa_1p_0001/test_mf_llama2_13b_predict_pa_1p_0001_export.yaml --device_id 1 --run_mode export --use_parallel False > /home/workspace/lite_test/test_0328/MindFormers_Test/cases/llama2/13b/predict/test_mf_llama2_13b_predict_pa_1p_0001/test_mf_llama2_13b_predict_pa_1p_0001_export.log 2>&1

  2. 执行推理
    输入图片说明

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

推理成功,精度达标

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

输入图片说明

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

评论 (1)

HidyLi 创建了Bug-Report
HidyLi 添加了
 
kind/bug
标签
HidyLi 添加了
 
sig/mindformers
标签
HidyLi 添加了
 
attr/function
标签
HidyLi 添加了
 
v2.2.12
标签
HidyLi 修改了描述
HidyLi 负责人冯浩 修改为niyuxin94520
HidyLi 添加协作者chentanjie
HidyLi 添加协作者冯浩
HidyLi 添加了
 
v2.2.14
标签
niyuxin94520 任务状态TODO 修改为WIP
展开全部操作日志

根因分析:lite推理脚本run_infer_main.py 开启动态dynamic 开关和paged attention 开关报错,dynamic开关里面的逻辑是给非pa的动态推理使用的,pa时候的动态逻辑不走这个开关里面的代码。
解决方案:两个开关设置互斥。pr已提交:!2664:【r1.0】修复lite推理时dynamic开关与paged_attention 开关的冲突/files

niyuxin94520 任务状态WIP 修改为VALIDATION
niyuxin94520 添加了
 
rct/bugfix
标签
niyuxin94520 添加了
 
ctl/solutiontest
标签
niyuxin94520 添加了
 
rca/algorithm
标签
niyuxin94520 负责人niyuxin94520 修改为HidyLi
HidyLi 任务状态VALIDATION 修改为DONE

登录 后才可以发表评论

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

搜索帮助

344bd9b3 5694891 D2dac590 5694891