jd-opensource / jd-opensource/JoyAI-VL-Interaction

上下文会不断累加,最终超过模型的context length然后报错

Open
#23 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
190
PR merge metrics
No merged PRs in 30d

Description

显卡是24G 的A5000
启动命令:
ENABLE_SUMMARIZER=false\
CHUNK=6 T_s=6\
MAX_MODEL_LEN=12000\
ADAPTER_HOST="0.0.0.0" WEBINFER_ARGS="--gpu-memory-utilization 0.9 \
--quantization fp8 \
--limit-mm-per-prompt '{\"image\":8,\"video\":1}'" bash services/webinfer/scripts/run.sh all

在运行400多轮后报错
(APIServer pid=314978) ValueError: Input length (12272) exceeds model's maximum context length (12000).
2026-07-02 06:31:30,816 INFO httpx: HTTP Request: POST http://127.0.0.1:7060/v1/chat/completions "HTTP/1.1 400 Bad Request"
2026-07-02 06:31:30,817 ERROR streaming_infer_adapter: chat completion failed
Traceback (most recent call last):

由于显存比较小,最大只能设置MAX_MODEL_LEN=12000
但是上下文会不断累加最终超过12000
请问下这种问题怎么解决。
我有个疑问,假设是80G的显存,那上下文不断累加的话是不是最终也会报错?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with services/webinfer/scripts/run.sh and reproduce the failure using the reported settings, especially ENABLE_SUMMARIZER=false and MAX_MODEL_LEN=12000. Trace how conversation context is accumulated across requests and identify where the 12,272-token input exceeds the configured limit. Done means the behavior for long-running conversations is defined and verified without exceeding the model context limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.