mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-07-21 02:05:51 +00:00
conversion: accept BitNetForCausalLM architecture name (#25769)
Microsoft BitNet Hugging Face configs use BitNetForCausalLM while the converter only registered BitnetForCausalLM, causing conversion to fail with "Model BitNetForCausalLM is not supported". Register both spellings in TEXT_MODEL_MAP and the Bitnet model class. Fixes ggml-org/llama.cpp#25629
This commit is contained in:
@@ -31,6 +31,7 @@ TEXT_MODEL_MAP: dict[str, str] = {
|
|||||||
"BertForSequenceClassification": "bert",
|
"BertForSequenceClassification": "bert",
|
||||||
"BertModel": "bert",
|
"BertModel": "bert",
|
||||||
"BitnetForCausalLM": "bitnet",
|
"BitnetForCausalLM": "bitnet",
|
||||||
|
"BitNetForCausalLM": "bitnet",
|
||||||
"BloomForCausalLM": "bloom",
|
"BloomForCausalLM": "bloom",
|
||||||
"BloomModel": "bloom",
|
"BloomModel": "bloom",
|
||||||
"CamembertModel": "bert",
|
"CamembertModel": "bert",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ if TYPE_CHECKING:
|
|||||||
from .base import ModelBase, TextModel, gguf
|
from .base import ModelBase, TextModel, gguf
|
||||||
|
|
||||||
|
|
||||||
@ModelBase.register("BitnetForCausalLM")
|
@ModelBase.register("BitnetForCausalLM", "BitNetForCausalLM")
|
||||||
class BitnetModel(TextModel):
|
class BitnetModel(TextModel):
|
||||||
model_arch = gguf.MODEL_ARCH.BITNET
|
model_arch = gguf.MODEL_ARCH.BITNET
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user