Skip to content

关于显存爆炸 - OutOfMemoryError: CUDA out of memory #48

Description

@looneyren

消费级显卡:3060 - 12GB
启动命令:python -m llmzoo.deploy.cli --model-path FreedomIntelligence/phoenix-inst-chat-7b --max-gpu-memory 10Gib --load-8bit

在 Human 输入 prompt 回车后内存不足:

Human: Who are you?
Assistant:

OutOfMemoryError: CUDA out of memory. Tried to allocate 1.91 GiB (GPU 0; 11.77 GiB total capacity; 8.59 GiB already allocated; 1.86 GiB free; 8.70 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting
max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

难道 --max-gpu-memory 10Gib 没起作用?如何优化呢?求教

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions