Skip to content

AttributeError: TL1 , when building the project on MacOS , M1 device. #99

Open

Description

@DoggingDog

I'm using :

  • MacOS Ventura 13.2.1
  • MacBook Air M1

When I execute the command :
python setup_env.py --hf-repo HF1BitLLM/Llama3-8B-1.58-100B-tokens -q i2_s

I got the message:

INFO:root:Compiling the code using CMake.
INFO:root:Downloading model HF1BitLLM/Llama3-8B-1.58-100B-tokens from HuggingFace to models/Llama3-8B-1.58-100B-tokens...
INFO:root:Converting HF model to GGUF format...
ERROR:root:Error occurred while running command: Command '['/opt/homebrew/anaconda3/envs/bitnet-cpp/bin/python3', 'utils/convert-hf-to-gguf-bitnet.py', 'models/Llama3-8B-1.58-100B-tokens', '--outtype', 'f32']' returned non-zero exit status 1., check details in logs/convert_to_f32_gguf.log

then I execute the command directly :
python utils/convert-hf-to-gguf-bitnet.py models/Llama3-8B-1.58-100B-tokens --outtype f32

I got a AttributeError:

Traceback (most recent call last):
  File "/Users/doggingdog/workplace/py_workplace/BitNet/utils/convert-hf-to-gguf-bitnet.py", line 1083, in <module>
    "tl1" : gguf.GGMLQuantizationType.TL1,
  File "/opt/homebrew/anaconda3/envs/bitnet-cpp/lib/python3.9/enum.py", line 429, in __getattr__
    raise AttributeError(name) from None
AttributeError: TL1

Did I miss something ? Has anybody try Bitnet on Mac and got the same problem ?

Activity

  1. potassiummmm commented on Nov 1, 2024

    @potassiummmm
    Collaborator

    It looks like gguf-py package is not installed correctly, please use the pip list command to check the gguf-py version, and check the contents of logs/install_gguf.log. To fix the problem, you can manually install gguf-py with python -m pip install 3rdparty/llama.cpp/gguf-py

  2. DoggingDog commented on Nov 3, 2024

    @DoggingDog
    Author

    It looks like gguf-py package is not installed correctly, please use the pip list command to check the gguf-py version, and check the contents of logs/install_gguf.log. To fix the problem, you can manually install gguf-py with python -m pip install 3rdparty/llama.cpp/gguf-py

    I tried it. guff-py successfully built:

    Successfully built gguf
    Installing collected packages: gguf
      Attempting uninstall: gguf
        Found existing installation: gguf 0.10.0
        Uninstalling gguf-0.10.0:
          Successfully uninstalled gguf-0.10.0
    Successfully installed gguf-0.10.0
    

    But the exception occur again:

    Traceback (most recent call last):
      File "/Users/doggingdog/workplace/py_workplace/BitNet/utils/convert-hf-to-gguf-bitnet.py", line 1083, in <module>
        "tl1" : gguf.GGMLQuantizationType.TL1,
      File "/opt/homebrew/anaconda3/envs/bitnet/lib/python3.9/enum.py", line 429, in __getattr__
        raise AttributeError(name) from None
    AttributeError: TL1
    

    is the guff version incompatible with project?

  3. srsng commented on Nov 4, 2024

    @srsng

    same problem.

  4. L4-1024 commented on Dec 3, 2024

    @L4-1024

    same problem.

    #25

    this solved problem

  5. srsng commented on Dec 4, 2024

    @srsng

    run this command at a new dir of BitNet may help

    git submodule update --init --recursive
    

    it will help you clone and init the 3rdparty module (llama.cpp).

  6. DoggingDog commented on Dec 4, 2024

    @DoggingDog
    Author

    run this command at a new dir of BitNet may help

    git submodule update --init --recursive
    

    it will help you clone and init the 3rdparty module (llama.cpp).

    It works ! thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions