mirror of
https://github.com/deepseek-ai/DeepSeek-V2.git
synced 2026-11-05 00:47:23 +00:00
[GH-ISSUE #74] 为何我在A800上运行DeepSeek-V2-Lite-Chat (SFT),竟然消耗60G的显存?! #70
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-V2#70
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @winsurelab on GitHub (Jul 19, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-V2/issues/74
权重文件一共32G左右。
为啥实际加载模型后,占用内存将近60多G呢。
@winsurelab commented on GitHub (Jul 25, 2024):
模型加载时,通过指定数据类型为float16避免使用全精度,可以使内存降到40G以下。
@liangfang commented on GitHub (Jul 28, 2024):
注意到这句话——
The model has a long context length (163840). This may cause OOM errors during the initial memory profiling phase, or result in low performance due to small KV cache space.
Consider setting --max-model-len to a smaller value.
但是我也想就此请教一下long context length为啥消耗显存那么多?
@beep-bebop commented on GitHub (Aug 6, 2024):
我猜是为long context做了显存的预分配,后续推理的时候显存不会变化太多。