Skip to content

Conversation

@Ayush10
Copy link

@Ayush10 Ayush10 commented Feb 1, 2026

Summary

  • Fixed @Model.register("BitnetForCausalLM")@Model.register("BitNetForCausalLM") (capital 'N') in both convert-hf-to-gguf-bitnet.py and generate-dummy-bitnet-model.py
  • HuggingFace model configs use "BitNetForCausalLM" as the architecture name, but the registration decorator had a lowercase 'n', causing the case-sensitive lookup in from_model_architecture() to fail with NotImplementedError: Architecture 'BitNetForCausalLM' not supported!
  • This completely blocked TL2 model conversion (python setup_env.py -md models/BitNet-b1.58-2B-4T -q tl2)

Test plan

  • Run python setup_env.py -md models/BitNet-b1.58-2B-4T -q tl2 and verify conversion completes without NotImplementedError
  • Verify existing i2_s and tl1 quantization paths still work

Fixes #300

The model registration decorator used "BitnetForCausalLM" (lowercase 'n')
but HuggingFace model configs specify "BitNetForCausalLM" (uppercase 'N').
This caused a NotImplementedError when converting models to TL2 GGUF format,
since the case-sensitive dictionary lookup in from_model_architecture() failed.

Fixed in both convert-hf-to-gguf-bitnet.py and generate-dummy-bitnet-model.py.

Fixes microsoft#300
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

Successfully merging this pull request may close these issues.

Build fails when using TL2

1 participant