diff --git a/unsloth/__init__.py b/unsloth/__init__.py index 5102d8f466..d5651d5edb 100644 --- a/unsloth/__init__.py +++ b/unsloth/__init__.py @@ -31,6 +31,10 @@ # enabling it will require much more work, so we have to prioritize. Please understand! # We do have a beta version, which you can contact us about! # Thank you for your understanding and we appreciate it immensely! + +# Fixes https://github.com/unslothai/unsloth/issues/1266 +os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" + if "CUDA_VISIBLE_DEVICES" in os.environ: os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" devices = os.environ["CUDA_VISIBLE_DEVICES"]