unslothai / unsloth

Finetune Llama 3.2, Mistral, Phi, Qwen 2.5 & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
18.37k stars 1.28k forks source link

fix indentation error in models/_utils.py:209 #1287

Open grpathak22 opened 1 week ago

grpathak22 commented 1 week ago

Fixed this error I was getting while using FastInference Traceback (most recent call last):

File /opt/conda/lib/python3.10/site-packages/IPython/core/interactiveshell.py:3553 in run_code exec(code_obj, self.user_global_ns, self.user_ns)

Cell In[16], line 1 from unsloth import FastLanguageModel

File /opt/conda/lib/python3.10/site-packages/unsloth/init.py:170 from .models import *

File /opt/conda/lib/python3.10/site-packages/unsloth/models/init.py:15 from .loader import FastLanguageModel

File /opt/conda/lib/python3.10/site-packages/unsloth/models/loader.py:15 from ._utils import is_bfloat16_supported, HAS_FLASH_ATTENTION, HAS_FLASH_ATTENTION_SOFTCAPPING

File /opt/conda/lib/python3.10/site-packages/unsloth/models/_utils.py:209 exec(source)

File :25 )if len(self) == 0: ^ SyntaxError: invalid syntax