CatCode
V2EX  ›  Local LLM

7B 大模型不量化, 16G 显存就差那么一点儿,难道消费级显卡只有 90 系能跑?

  •  
  •   CatCode · Feb 26, 2024 · 3152 views
    This topic created in 846 days ago, the information mentioned may be changed or developed.

    目前挺多开源/开放大模型的,7B 这个级别的也不少。现在主流的模型用的是 bf16 的数据类型。

    理论上是几乎刚刚放下。但显存里总得放点儿别的东西;权重的各部分之间也不是那么整整齐齐,总要浪费一些空间。

    16G 显存的显卡,就愣是放不下 7B 模型了。

    4070TiS 、4080 、4080S 都是 16G 。再往上就得 4090D 和 4090 了(算上上代还有 3090 )。

    不是说 int8 量化的不好,就是单纯吐槽 7B bf16 正好卡在这个位置,真是膈应啊。

    6 replies    2024-03-05 16:55:47 +08:00
    Orenoid
        1
    Orenoid  
       Feb 26, 2024
    我的显卡是 4070 ,显存 12 GB ,用 ollama 跑 qwen 7b 和 mistral 7b 感觉都挺流畅的呀,qwen 14b 也勉强能跑,如果 ollama 默认拉取的就是已经量化了的模型,那就不清楚了
    F281M6Dh8DXpD1g2
        2
    F281M6Dh8DXpD1g2  
       Feb 26, 2024
    你买 A100 老黄就把你当人了
    臭打游戏的一边凉快去
    CatCode
        3
    CatCode  
    OP
       Feb 27, 2024
    @Orenoid 应该是量化过的。
    7000000000 个 bf16 值,紧密排列,就要 13 GiBytes 空间。浮点数数组用通用压缩算法并不好压缩。
    159526aa
        4
    159526aa  
       Feb 27, 2024
    跑个量化 14b 不比你无量化 7b 强多了
    shm7
        5
    shm7  
       Feb 27, 2024
    1. 是不是不考虑输入输出长度了,现在都是 16K 了。
    2. 7B 你也叫大模型了,拿这些老/消费卡不行也是正常的吧。
    basncy
        6
    basncy  
       Mar 5, 2024
    OutOfMemoryError: CUDA out of memory. Tried to allocate 1.08 GiB. GPU 0 has a total capacty of 14.75 GiB of which 1.06 MiB is free. Process 2290 has 13.72 GiB memory in use. Of the allocated memory 10.38 GiB is allocated by PyTorch, and 3.20 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5627 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 84ms · UTC 08:49 · PVG 16:49 · LAX 01:49 · JFK 04:49
    ♥ Do have faith in what you're doing.