Skip to content

Commit 9fc1307

Browse files
committed
Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION to 'python' to address issue #1266
1 parent ec49385 commit 9fc1307

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

unsloth/save.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,11 @@ def save_to_gguf(
889889
# "undergoing some major bug fixes as at 5th of May 2024. This is not an Unsloth issue.\n"\
890890
# "Please be patient - GGUF saving should still work, but might not work as well."
891891
# )
892+
893+
# Fixes this issue
894+
# https://github.com/unslothai/unsloth/issues/1266
895+
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = 'python'
896+
892897
assert(model_dtype == "float16" or model_dtype == "bfloat16")
893898
model_dtype = "f16" if model_dtype == "float16" else "bf16"
894899

0 commit comments

Comments
 (0)