Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Philip's blog #44

Open
p208p2002 opened this issue Oct 26, 2024 · 0 comments
Open

Philip's blog #44

p208p2002 opened this issue Oct 26, 2024 · 0 comments

Comments

@p208p2002
Copy link
Owner

https://blog.philip-huang.tech/?page=transformers-vram-comsumption

Transformers 模型因其卓越的性能被廣泛應用於各種自然語言處理任務。然而,隨著模型參數的增加,記憶體需求也隨之增長,導致資源的消耗成為開發者面臨的重要挑戰。我們將介紹如何估算 Transformers 模型的記憶體用量,以便提供開發者在應用時的參考。

常見數據類型

數據類型直接影響模型的記憶體用量和計算效率。常見的數據類型包括浮點數(如 FP32、FP16、BF16)和整數(如 int8、int4)。

Data Type Size (Bytes)
FP32 4
FP16 2
BF16 2
int8 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant