Skip to content

Commit 9ecf1bd

Browse files
committed
fix old 9b err & remove some note debug log
1 parent 498ed97 commit 9ecf1bd

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

convert_hf_to_gguf.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,8 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
281281
return [(self.map_tensor_name(name), data_torch)]
282282

283283
def tensor_force_quant(self, name: str, new_name: str, bid: int | None, n_dims: int) -> gguf.GGMLQuantizationType | bool:
284-
# 删除未使用的参数,避免警告或错误
285284
del name, new_name, bid, n_dims # unused
286285

287-
# 返回False,表示不进行量化
288286
return False
289287

290288
# some models need extra generated tensors (like rope_freqs)
@@ -5051,7 +5049,6 @@ def set_vocab(self):
50515049
special_vocab._set_special_token("unk", tokenizer.get_added_vocab()["<|endoftext|>"])
50525050
# exclude glm-edge 1.5B & 4B
50535051
if self.hparams.get("partial_rotary_factor", 1.0) == 0.5:
5054-
print("add bos in model")
50555052
special_vocab._set_special_token("bos", tokenizer.get_added_vocab()["[gMASK]"])
50565053
special_vocab.add_to_gguf(self.gguf_writer)
50575054

src/llama-model.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3467,7 +3467,6 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
34673467
// output
34683468
output_norm = create_tensor(tn(LLM_TENSOR_OUTPUT_NORM, "weight"), {n_embd}, 0);
34693469
output = create_tensor(tn(LLM_TENSOR_OUTPUT, "weight"), {n_embd, n_vocab}, 0);
3470-
// if output is NULL, init from the input tok embed
34713470
for (int i = 0; i < n_layer; ++i) {
34723471
auto & layer = layers[i];
34733472

@@ -3494,7 +3493,7 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
34943493

34953494
layer.ffn_down = create_tensor(tn(LLM_TENSOR_FFN_DOWN, "weight", i), {n_ff, n_embd}, 0);
34963495

3497-
layer.ffn_post_norm = create_tensor(tn(LLM_TENSOR_FFN_POST_NORM, "weight", i), {n_embd}, 0);
3496+
layer.ffn_post_norm = create_tensor(tn(LLM_TENSOR_FFN_POST_NORM, "weight", i), {n_embd}, TENSOR_NOT_REQUIRED);
34983497
}
34993498
} break;
35003499
case LLM_ARCH_NEMOTRON:

0 commit comments

Comments
 (0)