6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

LLM推論時のメモリ使用量の調査

Posted at

最近流行りのLLMを動かした時のメモリ使用量を調査した。今回の調査では時間短縮のため2種類のPCで実行しているが結果はどちらとも対して変わらないと思う。

検証環境

  • デスクトップPC
    • Ubuntu 20.04
    • メインメモリ: 128GB
    • VRAM: 24GB (RTX3090)
    • LLaMA.cpp
    • FlexGen
  • MacBookPro
    • M1 Max
    • 64GB Unified memory
    • LLaMA.cpp

LLaMA-FP16

LLaMA.cppのプロセスのみの使用量です。

モデル メインメモリ使用量(ピーク)
7B 13 GB
13B 25 GB
30B 65 GB
65B 123 GB

LLaMA-Q4

LLaMA.cppのプロセスのみの使用量です。

モデル メインメモリ使用量(ピーク)
7B 4 GB
13B 8 GB
30B 19 GB
65B 39 GB

OPT CUDA --compress-weight

felxgenのプロセスのみの使用量です。GPU100%で実行してます。

モデル メインメモリ使用量(ピーク)
6.7B 2 GB
13B 5 GB
30B 10 GB
モデル VRAM使用量(ピーク)
6.7B 5 GB
13B 9 GB
30B 19 GB

OPT CUDA

felxgenのプロセスのみの使用量です。GPU100%で実行してます。
重み圧縮なしです。

モデル メインメモリ使用量(ピーク)
6.7B 1 GB
モデル VRAM使用量(ピーク)
6.7B 14 GB

最後に

LLM入門セットはRTX3090 + 128GBメモリかなと思います。

DGX Station A100ほしい。

6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?