遇到报错:
ValueError: The model’s max seq len (19008) is larger than the maximum number of tokens that can be stored in KV cache (3840). Try increasing gpu_memory_utilization
or decreasing max_model_len
when initializing the engine.
问题原因:
在某些情况下,可能会因为GPU内存限制而需要调整模型的最大序列长度。如果遇到以上错误,说明序列长度超出了GPU的KV缓存限制。
解决办法:
我的报错中是KV cache (3840)
,那么我在启动命令最后加入:
--max-model-len 3840