airockchip / rknn-llm

Other
421 stars 37 forks source link

在板子上跑server的demo,跑不起来,帮看下什么原因 #53

Open luyu0816 opened 6 months ago

luyu0816 commented 6 months ago

运行日志如下: ~/llm/demo/server_demo$ sudo python flask_server.py --target_platform rk3588 --rkllm_model_path ../../model/minicpm.rkllm =========init....=========== rkllm-runtime version: 1.0.1, rknpu driver version: 0.9.6, platform: RK3588 E RKNN: [14:46:27.960] Cannot load clGetPlatformIDs! Error: could find any OpenCL devices!

chenpingfromgxu commented 6 months ago

我也是同样的问题。不知道如何能处理。

luyu0816 commented 6 months ago

您好!您的邮件我已收到,我会尽快查收,辛苦咯!

chenpingfromgxu commented 6 months ago

../rkllm_server/flask_server.py,第120行应该是False不是True.

.... class RKLLM(object): def init(self, model_path, target_platform): rknnllm_param = RKNNllmParam() rknnllm_param.model_path = bytes(model_path, 'utf-8') if target_platform == "rk3588": rknnllm_param.num_npu_core = 3 elif target_platform == "rk3576": rknnllm_param.num_npu_core = 1 rknnllm_param.max_context_len = 320 rknnllm_param.max_new_tokens = 512 rknnllm_param.top_k = 1 rknnllm_param.top_p = 0.9 rknnllm_param.temperature = 0.8 rknnllm_param.repeat_penalty = 1.1 rknnllm_param.frequency_penalty = 0.0 rknnllm_param.presence_penalty = 0.0 rknnllm_param.mirostat = 0 rknnllm_param.mirostat_tau = 5.0 rknnllm_param.mirostat_eta = 0.1 rknnllm_param.logprobs = False rknnllm_param.top_logprobs = 5 _rknnllm_param.usegpu = False self.handle = RKLLM_Handle_t() .....

fydeos-alex commented 6 months ago

Two reasons caused it:

luyu0816 commented 6 months ago

../rkllm_server/flask_server.py,第120行应该是False不是True.

.... class RKLLM(object): def init(self, model_path, target_platform): rknnllm_param = RKNNllmParam() rknnllm_param.model_path = bytes(model_path, 'utf-8') if target_platform == "rk3588": rknnllm_param.num_npu_core = 3 elif target_platform == "rk3576": rknnllm_param.num_npu_core = 1 rknnllm_param.max_context_len = 320 rknnllm_param.max_new_tokens = 512 rknnllm_param.top_k = 1 rknnllm_param.top_p = 0.9 rknnllm_param.temperature = 0.8 rknnllm_param.repeat_penalty = 1.1 rknnllm_param.frequency_penalty = 0.0 rknnllm_param.presence_penalty = 0.0 rknnllm_param.mirostat = 0 rknnllm_param.mirostat_tau = 5.0 rknnllm_param.mirostat_eta = 0.1 rknnllm_param.logprobs = False rknnllm_param.top_logprobs = 5 _rknnllm_param.usegpu = False self.handle = RKLLM_Handle_t() .....

确实是这个问题,感谢!

aileen5150 commented 5 months ago

感谢,确实是120的True导致了此问题

Kove-Zhang commented 4 months ago

感谢

secreat14 commented 3 weeks ago

我已经修改了,但还是报错: image image 我的设备是rk3588,鲁班猫4B系列的

luyu0816 commented 3 weeks ago

您好!您的邮件我已收到,我会尽快查收,辛苦咯!