convert-hf : fix flake8 indentation lint

This commit is contained in:
Francis Couture-Harpin 2024-05-25 12:47:01 -04:00
parent 93b9baee73
commit d703fa9fa5

View File

@ -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)