Skip to content

Commit 5338048

Browse files
committed
added opt swa to hash
Signed-off-by: Onkar Chougule <ochougul@qti.qualcomm.com>
1 parent e3e0fe1 commit 5338048

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

QEfficient/transformers/models/modeling_auto.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,8 +2343,9 @@ def get_seq_len_and_handle_specialized_prefill_model(self, prefill_seq_len: Opti
23432343

23442344
self.prefill(True)
23452345
self.hash_params["prefill_only"] = True
2346-
self.hash_params["num_blocks"] = num_q_blocks
2347-
self.hash_params["num_ffn_blocks"] = num_ffn_blocks
2346+
self.hash_params["NUM_Q_BLOCKS"] = num_q_blocks
2347+
self.hash_params["NUM_FFN_BLOCKS"] = num_ffn_blocks
2348+
self.hash_params["ENABLE_OPT_SWA"] = os.environ.get("ENABLE_OPT_SWA", "0")
23482349
return (
23492350
min_seq_len
23502351
if min_seq_len > constants.ONNX_EXPORT_EXAMPLE_SEQ_LEN

0 commit comments

Comments
 (0)