GPU usage discussion #902
Replies: 2 comments
-
|
When participating in discussions on the PriorLabs/TabPFN repository regarding GPU usage, it is best to keep your technical points direct and clear. Here is a simple guide to framing your post: |
Beta Was this translation helpful? Give feedback.
-
|
Hello everyone! I am testing TabPFN for one of our projects on molecular property prediction. I decided to go for fine-tuning but I could not make it work. Setup: model v2.6 on Nvidia GeForce RTX 2080 with 11GB of memory. I am not an expert in PyTorch but have been able to use the Here a snippet of my code: from tabpfn.finetuning import FinetunedTabPFNRegressor
from tabpfn.model_loading import ModelSource, prepend_cache_path
# As FinetunedTabPFNRegressor uses v2.5 by default, I set v2.6 manually
model_path = prepend_cache_path(
ModelSource.get_regressor_v2_6().default_filename
)
model = FinetunedTabPFNRegressor(
extra_regressor_kwargs={
"model_path": model_path
}
)
model.fit(train[cols], train.y, X_val=val[cols], y_val=val.y)Output: torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 94.00 MiB. GPU 0 has a total capacity of 10.57 GiB of which 42.06 MiB is free. Including non-PyTorch memory, this process has 10.52 GiB memory in use. Of the allocated memory 10.14 GiB is allocated by PyTorch, and 197.79 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://docs.pytorch.org/docs/stable/notes/cuda.html#optimizing-memory-usage-with-pytorch-cuda-alloc-conf)It is important to note that there are NO processes running on the GPU card (in fact the hardware has 4 cards all free). Does anyone have any advice on how to properly use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
Thanks for your valuable project. It will be better if we have a separate part for GPU usage discussion. In this part, you could estimate the VRAM requirement using the training size, feature size, test points size, etc. This will help the users know how much VRAM they need for their project, and with this estimation, you can print out the warning for users before they infer. Besides, as the VRAM size increases, it should be explained how we can use multiple GPUs with the model; in fact, support for multiple GPU compatibility is needed.
Regards,
Huy
Beta Was this translation helpful? Give feedback.
All reactions