Check if a HuggingFace model fits in your GPU
Project description
Check if a HuggingFace model will run on your GPU.
fitgpu takes a HuggingFace model ID and tells you whether the model's weights will fit in your GPU's available VRAM.
How?
- Gets model's file metadata from HuggingFace (weights are not downloaded)
- Sums up the sizes of all weight files (
.safetensors/.bin) - Queries your GPU's free VRAM using the NVIDIA driver
- Compares and shows the result
Installation
pip install fitgpu
Use
fitgpu <model_id> [--token TOKEN]
model_id— HuggingFace model ID (e.g.google/gemma-2-2b)--token TOKEN— optional, HuggingFace API token for gated/private models
Public models
fitgpu google/gemma-2-2b
Gated models
fitgpu meta-llama/Llama-2-7b-hf --token hf_YOUR_TOKEN
Example
$ fitgpu google/gemma-2-2b
model : google/gemma-2-2b
size : 4.89 GB (weights on disk)
GPU 0: NVIDIA RTX 4090
VRAM : 24.00 GB total, 22.31 GB free
result: fits
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fitgpu-0.1.1.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fitgpu-0.1.1.tar.gz.
File metadata
- Download URL: fitgpu-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
517b4ee319316b510ab5ae21af9511f74438d5c67651798f872f84c5fb21a766
|
|
| MD5 |
aca2774cb820dbd02f5168b23954d797
|
|
| BLAKE2b-256 |
7ddd8fa0a4d02aabc86a8f9418291096e197e9274b9e68472956eeb1d96916d8
|
File details
Details for the file fitgpu-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fitgpu-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dfb3a25fa829d9206473365a5231e5ef02feef382d046a95e2a5b645807b9c6
|
|
| MD5 |
c679a778ae94b2e7da56aed3860a0e9a
|
|
| BLAKE2b-256 |
34dd0c3d9f7eda1811084e94b69dba210267905e2396916c6ba133ddf7f617a6
|