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

Σφάλμα στο βημα 2 #215

Open
DrKrank opened this issue Feb 13, 2025 · 3 comments
Open

Σφάλμα στο βημα 2 #215

DrKrank opened this issue Feb 13, 2025 · 3 comments

Comments

@DrKrank
Copy link

DrKrank commented Feb 13, 2025

Αυτο το σφαλμα δεν εβγαινε πριν αλλα τωρα για καποιο λογο μου βγαινει και δεν μπορώ να συνχίσω.

Κώδικας
from unsloth import FastLanguageModel
import torch
max_seq_length = 2048
dtype = torch.float16 # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.

base_model_name = "unsloth/Llama-3.2-3B-Instruct" # or choose "unsloth/Llama-3.2-1B-Instruct"

model, tokenizer = FastLanguageModel.from_pretrained(
model_name = base_model_name,
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
)

Σφάλμα:
🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.
🦥 Unsloth Zoo will now patch everything to make training faster!

SyntaxError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/unsloth/tokenizer_utils.py in
1060 try:
-> 1061 exec(trainer_text, globals())
1062 except:

SyntaxError: invalid syntax (, line 4)

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from unsloth import FastLanguageModel
2 import torch
3 max_seq_length = 2048
4 dtype = torch.float16 # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
5 load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.

/usr/local/lib/python3.10/dist-packages/unsloth/init.py in
210 pass
211
--> 212 from .models import *
213 from .save import *
214 from .chat_templates import *

/usr/local/lib/python3.10/dist-packages/unsloth/models/init.py in
14
15
---> 16 from .granite import FastGraniteModel
17 from .loader import FastLanguageModel, FastVisionModel
18 from .llama import FastLlamaModel

/usr/local/lib/python3.10/dist-packages/unsloth/models/granite.py in
13 # limitations under the License.
14
---> 15 from .llama import *
16 import os
17 from ._utils import version

/usr/local/lib/python3.10/dist-packages/unsloth/models/llama.py in
34 )
35 from ..kernels import *
---> 36 from ..tokenizer_utils import *
37 if HAS_FLASH_ATTENTION:
38 from flash_attn import flash_attn_func

/usr/local/lib/python3.10/dist-packages/unsloth/tokenizer_utils.py in
1061 exec(trainer_text, globals())
1062 except:
-> 1063 raise RuntimeError(f"Unsloth: Please file a bug report! Error patching {trainer_name}")
1064 exec(f"trl.trainer.{trainer_name} = Unsloth{trainer_name}", globals())
1065 pass

RuntimeError: Unsloth: Please file a bug report! Error patching SFTTrainer

@DrKrank
Copy link
Author

DrKrank commented Feb 13, 2025

Έχω προσπαθήσει να κάνω, stop session, restart ακομα και factory reset και δεν αλλάζει κάτι

@EvaProg
Copy link

EvaProg commented Feb 13, 2025

Εγώ έβαλα !pip install trl==0.14.0 στο βήμα 1 και έφτιαξε. Γενικά είναι πάρα πολύ buggy...

@DrKrank
Copy link
Author

DrKrank commented Feb 14, 2025

Ευχαριστώ!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants