Update __init__.py (#1520)

* Update __init__.py

This PR is solving the (issue)[https://github.com/unslothai/unsloth/issues/1518] with some GPUs

* Update __init__.py

---------

Co-authored-by: Daniel Han <danielhanchen@gmail.com>
This commit is contained in:
sebaxakerhtc 2025-01-08 00:51:17 +02:00 committed by GitHub
commit c83153ffc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,9 +48,11 @@ pass
# And optimize pinning of memory
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = \
"expandable_segments:True,"\
"roundup_power2_divisions:[32:256,64:128,256:64,>:32],"\
"pinned_use_cuda_host_register:True,"\
"pinned_num_register_threads:8"
"roundup_power2_divisions:[32:256,64:128,256:64,>:32]"
# [TODO] Check why some GPUs don't work
# "pinned_use_cuda_host_register:True,"\
# "pinned_num_register_threads:8"
# Hugging Face Hub faster downloads
if "HF_HUB_ENABLE_HF_TRANSFER" not in os.environ: