Skip to content

Commit 795ff1d

Browse files
author
Joan Martinez
committed
fix: revert some changes
1 parent e232370 commit 795ff1d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

convert-hf-to-gguf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def get_tensors(self) -> Iterator[tuple[str, Tensor]]:
9292

9393
def set_gguf_parameters(self):
9494
self.gguf_writer.add_name(self.dir_model.name)
95-
print(f'self.block_count {self.block_count}')
9695
self.gguf_writer.add_block_count(self.block_count)
9796

9897
if (n_ctx := self.find_hparam(["max_position_embeddings", "n_ctx"], optional=True)) is not None:
@@ -138,7 +137,6 @@ def set_gguf_parameters(self):
138137
def write_tensors(self):
139138
block_count = self.hparams.get("n_layers", self.hparams.get("num_hidden_layers", self.hparams.get("n_layer")))
140139
tensor_map = gguf.get_tensor_name_map(self.model_arch, block_count)
141-
print(f'Block_count {block_count} with tensor_map {tensor_map}')
142140
for name, data_torch in self.get_tensors():
143141
# we don't need these
144142
if name.endswith((".attention.masked_bias", ".attention.bias", ".attention.rotary_emb.inv_freq")):
@@ -2188,6 +2186,9 @@ def get_tensors(self):
21882186
yield name, data
21892187

21902188

2189+
JinaBertForMaskedML = JinaBertModel
2190+
2191+
21912192
@Model.register("GemmaForCausalLM")
21922193
class GemmaModel(Model):
21932194
model_arch = gguf.MODEL_ARCH.GEMMA

ggml.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12476,8 +12476,9 @@ static void ggml_compute_forward_alibi_f32(
1247612476

1247712477
for (int64_t i = 0; i < ne0; i++) {
1247812478
for (int64_t j = 0; j < ne1; j++) {
12479+
float * const src = (float *)((char *) src0->data + i*nb0 + j*nb1 + k*nb2);
1247912480
float * pdst = (float *)((char *) dst->data + i*nb0 + j*nb1 + k*nb2);
12480-
pdst[0] = -1.0f * i * m_k;
12481+
pdst[0] = i * m_k + src[0];
1248112482
}
1248212483
}
1248312484
}

0 commit comments

Comments
 (0)