Skip to content

Llama3.1_(8B)-Alpaca.ipynb g collab notebook broken #49

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

Open
carafelix opened this issue May 20, 2025 · 1 comment
Open

Llama3.1_(8B)-Alpaca.ipynb g collab notebook broken #49

carafelix opened this issue May 20, 2025 · 1 comment

Comments

@carafelix
Copy link

vanilla Llama3.1_(8B)-Alpaca.ipynb throws in the second codeblock

<ipython-input-10-1dca45c36c67>:1: UserWarning: WARNING: Unsloth should be imported before trl, transformers, peft to ensure all optimizations are applied. Your code may run slower or encounter memory issues without these optimizations.

Please restructure your imports with 'import unsloth' at the top of your file.
  from unsloth import FastLanguageModel

---------------------------------------------------------------------------

ModuleNotFoundError                       Traceback (most recent call last)

[/usr/local/lib/python3.11/dist-packages/unsloth/models/qwen3.py](https://localhost:8080/#) in <module>
     24 try:
---> 25     from transformers.models.qwen3.modeling_qwen3 import (
     26         Qwen3Attention,

ModuleNotFoundError: No module named 'transformers.models.qwen3'


During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)

7 frames

[/usr/local/lib/python3.11/dist-packages/unsloth_zoo/utils.py](https://localhost:8080/#) in Version(version)
     30     try:
---> 31         return TrueVersion(version)
     32     except:

[/usr/local/lib/python3.11/dist-packages/packaging/version.py](https://localhost:8080/#) in __init__(self, version)
    199         # Validate the version and parse it into pieces
--> 200         match = self._regex.search(version)
    201         if not match:

TypeError: expected string or bytes-like object, got 'Version'


During handling of the above exception, another exception occurred:

RuntimeError                              Traceback (most recent call last)

[<ipython-input-10-1dca45c36c67>](https://localhost:8080/#) in <cell line: 0>()
----> 1 from unsloth import FastLanguageModel
      2 import torch
      3 max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
      4 dtype = None # 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.11/dist-packages/unsloth/__init__.py](https://localhost:8080/#) in <module>
    245 pass
    246 
--> 247 from .models import *
    248 from .models import __version__
    249 from .save import *

[/usr/local/lib/python3.11/dist-packages/unsloth/models/__init__.py](https://localhost:8080/#) in <module>
     14 
     15 from .llama     import FastLlamaModel
---> 16 from .loader    import FastLanguageModel, FastVisionModel, FastTextModel, FastModel
     17 from .mistral   import FastMistralModel
     18 from .qwen2     import FastQwen2Model

[/usr/local/lib/python3.11/dist-packages/unsloth/models/loader.py](https://localhost:8080/#) in <module>
     25 from .mistral import FastMistralModel
     26 from .qwen2   import FastQwen2Model
---> 27 from .qwen3   import FastQwen3Model
     28 from .qwen3_moe import FastQwen3MoeModel
     29 from .cohere  import FastCohereModel

[/usr/local/lib/python3.11/dist-packages/unsloth/models/qwen3.py](https://localhost:8080/#) in <module>
     30     )
     31 except:
---> 32     transformers_version = Version(transformers_version)
     33     if not transformers_version >= Version("4.50.3"): #TODO: Update when transformers is updated
     34         raise ImportError(

[/usr/local/lib/python3.11/dist-packages/unsloth_zoo/utils.py](https://localhost:8080/#) in Version(version)
     33         from inspect import getframeinfo, stack
     34         caller = getframeinfo(stack()[1][0])
---> 35         raise RuntimeError(
     36             f"Unsloth: Could not get version for `{version}`\n"\
     37             f"File name = [{caller.filename}] Line number = [{caller.lineno}]"

RuntimeError: Unsloth: Could not get version for `4.48.3`
File name = [/usr/local/lib/python3.11/dist-packages/unsloth/models/qwen3.py] Line number = [32]
@carafelix carafelix changed the title Llama3.1_(8B)-Alpaca.ipynb notebooke broken Llama3.1_(8B)-Alpaca.ipynb notebook broken May 20, 2025
@carafelix carafelix changed the title Llama3.1_(8B)-Alpaca.ipynb notebook broken Llama3.1_(8B)-Alpaca.ipynb g collab notebook broken May 20, 2025
@Erland366
Copy link
Collaborator

Hellom I just tested it again and it seems working again. Can you kindly check again please?

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