Skip to content

Commit 9e1179a

Browse files
committed
delete unnecessary files
1 parent 6aa1335 commit 9e1179a

File tree

6 files changed

+3
-165
lines changed

6 files changed

+3
-165
lines changed

convert_hf_to_gguf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,6 @@ def get_vocab_base_pre(self, tokenizer) -> str:
809809
if chkhsh == "1431a23e583c97432bc230bff598d103ddb5a1f89960c8f1d1051aaa944d0b35":
810810
# ref: https://huggingface.co/sapienzanlp/Minerva-7B-base-v1.0
811811
res = "minerva-7b"
812-
if chkhsh == "a0b64b4385f123663873756336c085744376d015ff328bb1d901598f63c44152":
813-
# ref: https://huggingface.co/answerdotai/ModernBERT-base
814-
res = "modern-bert"
815812

816813
if res is None:
817814
logger.warning("\n")
@@ -3941,14 +3938,14 @@ class ModernBertModel(BertModel):
39413938
model_arch = gguf.MODEL_ARCH.MODERN_BERT
39423939

39433940
def set_gguf_parameters(self):
3941+
super().set_gguf_parameters()
3942+
self._try_set_pooling_type()
39443943
self.gguf_writer.add_sliding_window(self.hparams["local_attention"])
39453944
self.gguf_writer.add_rope_freq_base(self.hparams["global_rope_theta"])
39463945
self.gguf_writer.add_rope_freq_base_swa(self.hparams["local_rope_theta"])
39473946
self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.NONE)
39483947
self.gguf_writer.add_vocab_size(self.hparams["vocab_size"])
39493948

3950-
super().set_gguf_parameters()
3951-
39523949
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
39533950
# These layers act as MLM head, so we don't need them
39543951
if name.startswith("decoder."):

convert_hf_to_gguf_update.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ class TOKENIZER_TYPE(IntEnum):
128128
{"name": "llama4", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/meta-llama/Llama-4-Scout-17B-16E-Instruct", },
129129
{"name": "pixtral", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/mistral-community/pixtral-12b", },
130130
{"name": "seed-coder", "tokt": TOKENIZER_TYPE.BPE, "repo": "https://huggingface.co/ByteDance-Seed/Seed-Coder-8B-Base", },
131-
{"name": "modern-bert", "tokt": TOKENIZER_TYPE.WPM, "repo": "https://huggingface.co/answerdotai/ModernBERT-base", },
132131
]
133132

134133
# some models are known to be broken upstream, so we will skip them as exceptions

models/ggml-vocab-modern-bert.gguf

-1.06 MB
Binary file not shown.

models/ggml-vocab-modern-bert.gguf.inp

Lines changed: 0 additions & 112 deletions
This file was deleted.

models/ggml-vocab-modern-bert.gguf.out

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/llama-hparams.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct llama_hparams {
166166
// The remainder parameter specifies which position in the pattern is dense
167167
// example: n_pattern = 3, remainder = 2
168168
// il == 0: swa (0 % 3 = 0, which is not equal to 2)
169-
// il == 1: swa (1 % 3 = 1, which is not equal to 2)
169+
// il == 1: swa (1 % 3 = 1, which is not equal to 2)
170170
// il == 2: dense (2 % 3 = 2, which equals 2)
171171
// il == 3: swa (3 % 3 = 0, which is not equal to 2)
172172
// il == 4: swa (4 % 3 = 1, which is not equal to 2)

0 commit comments

Comments
 (0)