Skip to content

Commit 2f9675c

Browse files
quic-rishinrvbaddi
andauthored
CPU pytest unit test suite (#852)
Pytest unit tests designed as a preflight before submitting a PR. Runs fully on CPU and focuses on module level testing, transformation correctness, and accuracy comparison between HF, transformed HF, and ORT for representative models. --------- Signed-off-by: Rishin Raj <rishinr@qti.qualcomm.com> Signed-off-by: vbaddi <vbaddi@qti.qualcomm.com> Co-authored-by: vbaddi <vbaddi@qti.qualcomm.com>
1 parent 652351b commit 2f9675c

32 files changed

+16724
-0
lines changed

QEfficient/transformers/models/modeling_auto.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3527,6 +3527,8 @@ def check_and_get_num_speculative_tokens(self, num_speculative_tokens: Optional[
35273527
If `num_speculative_tokens` is not an integer greater than 1.
35283528
If `prefill_seq_len` is less than `num_speculative_tokens + 1`.
35293529
"""
3530+
if not self.is_tlm:
3531+
return None
35303532
if hasattr(self.model.config, "speculative_config"):
35313533
num_speculative_tokens_ = self.model.config.speculative_config["num_speculative_tokens"]
35323534
if num_speculative_tokens is not None:

0 commit comments

Comments
 (0)