mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-13 05:42:22 +01:00
convert-hf : fix flake8 indentation lint
This commit is contained in:
parent
93b9baee73
commit
d703fa9fa5
@ -869,11 +869,11 @@ class BaichuanModel(Model):
|
|||||||
if bid is not None and name == f"model.layers.{bid}.self_attn.W_pack.weight":
|
if bid is not None and name == f"model.layers.{bid}.self_attn.W_pack.weight":
|
||||||
logger.info(f"Unpacking and permuting layer {bid}")
|
logger.info(f"Unpacking and permuting layer {bid}")
|
||||||
yield (self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_Q, bid),
|
yield (self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_Q, bid),
|
||||||
self._reverse_hf_permute_part(data_torch, 0, head_count, head_count))
|
self._reverse_hf_permute_part(data_torch, 0, head_count, head_count))
|
||||||
yield (self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_K, bid),
|
yield (self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_K, bid),
|
||||||
self._reverse_hf_permute_part(data_torch, 1, head_count, head_count_kv))
|
self._reverse_hf_permute_part(data_torch, 1, head_count, head_count_kv))
|
||||||
yield (self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_V, bid),
|
yield (self.format_tensor_name(gguf.MODEL_TENSOR.ATTN_V, bid),
|
||||||
self._reverse_hf_part(data_torch, 2))
|
self._reverse_hf_part(data_torch, 2))
|
||||||
else:
|
else:
|
||||||
yield (self.map_tensor_name(name), data_torch)
|
yield (self.map_tensor_name(name), data_torch)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user