Skip to content

Commit c3a8a16

Browse files
authored
fix deepseek (#5410)
1 parent f6eb4dc commit c3a8a16

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fastdeploy/model_executor/layers/linear.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,12 @@ def __init__(
977977
def process_weights_after_loading(self):
978978
if self.fd_config.load_config.dynamic_load_weight:
979979
return
980-
w = self.kv_b_proj.weight.reshape(
980+
w = (
981+
self.kv_b_proj.weight.transpose([1, 0])
982+
if self.fd_config.model_config.model_format == "torch"
983+
else self.kv_b_proj.weight
984+
)
985+
w = w.reshape(
981986
[
982987
self.kv_lora_rank,
983988
self.num_heads_per_partition,

0 commit comments

Comments
 (0)