microsoft / microsoft/BitNet

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

Open
#99 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
40.3k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

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 ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with setup_env.py and reproduce the failure using the command in the issue, then run utils/convert-hf-to-gguf-bitnet.py directly. Inspect logs/convert_to_f32_gguf.log and the conversion script around the GGUF quantization mapping; done means the model conversion completes successfully on the reported Mac M1 setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos, python
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.