InternLM / InternLM/lmdeploy

昇腾lmdeploy使用 lmdeploy APIClient 接口时,推理结果被截断

Open
#2,969 5 comments 0 reactions 1 assignee Claimed by @jinminxi104 View on GitHub
Dominant language
Python
Stars
8.1k
Forks
748
Avg merge
6d 2h
Merged PRs (30d)
54

Description

### Checklist

- [X] 1. I have searched related issues but cannot get the expected help.
- [X] 2. The bug has not been fixed in the latest version.
- [X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

### Describe the bug

昇腾lmdeploy使用lmdeploy serve api_server \
/LLaMA-Factory-main/model/Qwen2.5-7B-Instruct \
--backend pytorch \
--server-port 8000 \
--device ascend \
--session-len 8192启动服务,使用 lmdeploy APIClient 接口接收结果时,推理结果被截断。
![d692e0b3895d7a5a3d8a71b9ac274c7](https://github.com/user-attachments/assets/91cfc9d4-b09d-4faa-985e-3079e8ae17dd)

### Reproduction

API服务启动命令如下:lmdeploy serve api_server \
/LLaMA-Factory-main/model/Qwen2.5-7B-Instruct \
--backend pytorch \
--server-port 8000 \
--device ascend \
--session-len 8192,lmdeploy APIClient 接口代码如下:
![11e4a13323a13314f8aab56fbca8a47](https://github.com/user-attachments/assets/6ad7b79f-ba94-4cc7-904d-ae2965ba4d31)

### Environment

```Shell
TorchVision: 0.18.1
LMDeploy: 0.6.4+191a7dd
transformers: 4.47.1
gradio: Not Found
fastapi: 0.115.6
pydantic: 2.10.4
triton: Not Found
```

### Error traceback

```Shell
没有报错
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.