Skip to content

fix: add BitNetForCausalLM alias and vocab fallback for BitnetModel#581

Open
vikasvardhanv wants to merge 1 commit into
microsoft:mainfrom
vikasvardhanv:fix/architecture-alias
Open

fix: add BitNetForCausalLM alias and vocab fallback for BitnetModel#581
vikasvardhanv wants to merge 1 commit into
microsoft:mainfrom
vikasvardhanv:fix/architecture-alias

Conversation

@vikasvardhanv

Copy link
Copy Markdown

The model microsoft/BitNet-b1.58-2B-4T uses the architecture string BitNetForCausalLM (with a capital 'N'), but the convert-hf-to-gguf-bitnet.py script expected BitnetForCausalLM. Additionally, these newer models use BPE tokenization instead of SentencePiece, meaning they don't have a tokenizer.model file. This PR adds the alias to the @Model.register decorator and adds the same tokenizer fallback logic that LlamaModel uses so the conversion script can successfully process these models without throwing errors.

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.

1 participant