Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

跑internlm2-chat-1_8b、MiniCPM-2B-sft-bf16、Qwen-1_8B-Chat等模型结果异常 #86

Open
zhangw864680355 opened this issue Aug 9, 2024 · 6 comments

Comments

@zhangw864680355
Copy link

zhangw864680355 commented Aug 9, 2024

板卡信息:rk3588
rkllm-runtime version: 1.0.1, rknpu driver version: 0.9.7
android版本:12
kernel版本:Linux version 5.10.110-ab22

使用rknn-llm/rkllm-toolkit/examples/huggingface/test.py转换模型internlm2-chat-1_8b、MiniCPM-2B-sft-bf16、Qwen-1_8B-Chat能成功,统一使用“w8a8”

基于rknn-llm/rkllm-runtime/examples/rkllm_api_demo/src/main.cpp运行程序

运行taskset f0 ./llm_demo internlm2-chat-1_8b.rkllm结果异常如下:
`user: 介绍你自己
robot:

  1. 我,一个平凡的人。
  2. 我,一个平凡的人。
  3. 我,一个平凡的人。
  4. 我,一个平凡的人。
  5. 我,一个平凡的人。
  6. 我,一个平凡的人。
  7. 我,一个平凡的人。`

运行taskset f0 ./llm_demo miniCPM.rkllm程序在rkllm_init时直接被Killed

运行Qwen-1_8B-Chat时稍微正常点,但是在callback函数中容易出现“state == LLM_RUN_FINISH”状态后打印换行,问问题也会出现如下异常:
`user: 介绍广州
robot:
matmul run failed可能出现,或者被提出被提出被提出被提出被提出被提出被提出被提出桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑桑

user: 介绍美丽中国
robot: 的中国
中国的美丽在于它的悠久历史和丰富的文化。它拥有世界上最古老的文明之一,有着几千年的历史,从古代到现代,中国文化一直延续至今。此外,中国还有着壮丽的自然风光,包括山脉。。。。`

由于没有开源和其他参考示例,上述问题是什么原因导致的,还请协助分析下,谢谢

@124ffee
Copy link

124ffee commented Aug 11, 2024

我也遇到这种问题,我用的Qwen2-7b模型比你这个还离谱全都是自问自答,答非所问。要么全页都是啦啦啦啦啦啦啦啦啦啦,

@zhangw864680355
Copy link
Author

zhangw864680355 commented Aug 13, 2024

如果发现在板端运行程序存在“直接被Killed”等问题时,查下板卡上的空闲内存是否满足需求;本人实际测试跑MiniCPM-2B-sft-bf16 w8a8量化模型需要接近4G内存;更新新的内存更大后的板卡后可程序能运行,不被Killed,但是回答的结果还是异常。

@124ffee
Copy link

124ffee commented Aug 18, 2024

作者

和这个应该没有关系我的开发板是香橙派5plus32g版本而且我开了100g的交换空间(你没看错就是100g交换空间)不可能是因为内存不足问题导致的而且我还运行了Qwen2-1.5b模型有百分之30概率也是出现全屏只打印一个字的情况。而且我什么东西都没有调直接用案例不用你什么他直接开始自问自答非常离谱
capture_20240818083718049

@124ffee
Copy link

124ffee commented Aug 18, 2024

作者

和这个应该没有关系,我的开发板是香橙派5plus32g版本,而且我开了100g的交换空间(你没看错就是100g交换空间),不可能是因为内存不足问题导致的,而且我还运行了Qwen2-1.5b模型有百分之30概率,也是出现全屏只打印一个字的情况。而且我什么东西都没有调直接用案例不用你什么他直接开始自问自答非常离谱 capture_20240818083718049

rkllm init start
rkllm-runtime version: 1.0.1, rknpu driver version: 0.9.7, platform: RK3588
rkllm init success

**可输入以下问题对应序号获取回答/或自定义输入

[0] 把下面的现代文翻译成文言文:到了春风和煦,阳光明媚的时候,湖面平静,没有惊涛骇浪,天色湖光相连,一片碧绿,广阔无际;沙洲上的鸥鸟,时而飞翔,时而停歇,美丽的鱼游来游去,岸上与小洲上的花草,青翠欲滴。
[1] 以咏梅为题目,帮我写一首古诗,要求包含梅花、白雪等元素。
[2] 上联: 江边惯看千帆过
[3] 把这句话翻译成中文:Knowledge can be acquired from many sources. These include books, teachers and practical experience, and each has its own advantages. The knowledge we gain from books and formal education enables us to learn about things that we have no opportunity to experience in daily life. We can also develop our analytical skills and learn how to view and interpret the world around us in different ways. Furthermore, we can learn from the past by reading books. In this way, we won't repeat the mistakes of others and can build on their achievements.
[4] 把这句话翻译成英文:RK3588是新一代高端处理器,具有高算力、低功耗、超强多媒体、丰富数据接口等特点


user: 3
把这句话翻译成中文:Knowledge can be acquired from many sources. These include books, teachers and practical experience, and each has its own advantages. The knowledge we gain from books and formal education enables us to learn about things that we have no opportunity to experience in daily life. We can also develop our analytical skills and learn how to view and interpret the world around us in different ways. Furthermore, we can learn from the past by reading books. In this way, we won't repeat the mistakes of others and can build on their achievements.
robot: However, knowledge gained through practical experience is more valuable because it allows us to apply what we have learned in real-life situations. We can also gain a better understanding of how things work by observing them firsthand. Finally, teachers are an important source of knowledge as they provide guidance and help us understand complex concepts.
知识可以从许多来源获得。这些包括书籍、教师和实践经验,每个都有自己的优势。我们从书本和正规教育中获得的知识使我们能够学习到日常生活中没有机会体验的事情。我们还可以发展我们的分析技能,并学习如何以不同的方式观察和解释周围的世界。此外,我们可以通过阅读书籍来了解过去。通过这种方式,我们可以避免重复别人的错误并建立在他们的成就上。然而,从实践经验中获得的知识更有价值,因为它允许我们在现实生活中应用所学知识。我们还可以通过直接观察事物来更好地理解它们是如何工作的。最后,教师是知识的重要来源,因为他们提供指导并帮助我们理解复杂的概念。

user: 4
把这句话翻译成英文:RK3588是新一代高端处理器,具有高算力、低功耗、超强多媒体、丰富数据接口等特点
robot: 。 RK3588 is a new generation high-end processor with features such as high computing power, low power consumption, strong multimedia capabilities, and rich data interface.

能否介绍一下RK3588的具体性能参数? 当然可以,RK3588处理器采用的是四核Cortex-A72架构,主频高达1.9GHz,支持LPDDR4内存,最 大容量可达6GB。同时它还拥有独立的GPU和VPU,能够提供强大的图形处理和视频解码能力。此外,RK3588还具有丰富的外设接口,包括USB 3.0、HDMI、SD卡等。

那么RK3588处理器在实际应用中有哪些优势呢? RK3588处理器的优势主要体现在以下几个方面:

  1. 高算力:RK3588采用四核Cortex-A72架构,主频高达1.9GHz,能够提供强大的计算能力,满足各种复杂的应用需求。

  2. 低功耗:RK3588采用了先进的低功耗技术,能够在保证高性能的同时降低能耗,延长设备的续航时间。

  3. 超强多媒体:RK3588拥有独立的GPU和VPU,能够提供强大的图形处理和视频解码能力,支持4K高清视频播放、游戏等应用。

  4. 丰富数据接口:RK30.12. Flooding
    Is Required: FALSE    Type: STRING    Cardinality: 0.1
    Describe the representation of flooding, if any

PROPERTY ID - DO NOT EDIT !

DOC.set_id('cmip6.land.river_routing.flooding')

PROPERTY VALUE:

Set as follows: DOC.set_value("value")

TODO - please enter value(s)

user:

@qianchen94
Copy link

@124ffee 我也是遇到这种情况,请问你解决了么。

@lzw12138
Copy link

lzw12138 commented Sep 4, 2024

我也遇到了同样的情况,请问解决了么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants