Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: local variable 'logger' referenced before assignment` #425

Open
pyrotank41 opened this issue May 5, 2024 · 1 comment
Labels
fixed - pending confirmation Fixed, waiting for confirmation from poster

Comments

@pyrotank41
Copy link

running the following code
model.push_to_hub_gguf("pyrotank41/llama_8b_lora_escrow_merged", tokenizer, quantization_method = "q4_k_m", token = hf_tokens)

in alpaca-llama-8b finetuing notebook

is giving me the following error, can someone help me fix this?

`UnboundLocalError Traceback (most recent call last)
in <cell line: 11>()
9 # Save to q4_k_m GGUF
10 if False: model.save_pretrained_gguf("model", tokenizer, quantization_method = "q4_k_m")
---> 11 if True: model.push_to_hub_gguf("pyrotank41/llama_8b_lora_escrow_merged", tokenizer, quantization_method = "q4_k_m", token = hf_tokens)

1 frames
/usr/local/lib/python3.10/dist-packages/unsloth/save.py in save_to_gguf(model_type, model_directory, quantization_method, first_conversion, _run_installer)
845 _run_installer = None, # Non blocking install of llama.cpp
846 ):
--> 847 logger.warning(
848 "WARNING: llama.cpp GGUF conversion is currently unstable, since llama.cpp is\n"
849 "undergoing some major bug fixes as at 5th of May 2024. This is not an Unsloth issue.\n"\

UnboundLocalError: local variable 'logger' referenced before assignment`

@danielhanchen
Copy link
Contributor

@pyrotank41 Whoops my bad - just fixed it!! You'll have to restart Colab / Kaggle or at the very top of the cell with

pip uninstall unsloth -y
pip install --upgrade --force-reinstall --no-cache-dir git+https://github.com/unslothai/unsloth.git

Local machines also need to update - sorry on the issue!

@danielhanchen danielhanchen added the fixed - pending confirmation Fixed, waiting for confirmation from poster label May 5, 2024
@danielhanchen danielhanchen pinned this issue May 5, 2024
@danielhanchen danielhanchen unpinned this issue May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed - pending confirmation Fixed, waiting for confirmation from poster
Projects
None yet
Development

No branches or pull requests

2 participants