Skip to content

Commit 200267a

Browse files
committed
Change in implementation
Signed-off-by: Dipankar Sarkar <[email protected]>
1 parent 9cbda36 commit 200267a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

QEfficient/transformers/models/modeling_auto.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,10 +1406,9 @@ def __init__(
14061406
self.num_layers = model.config.num_hidden_layers
14071407
self.continuous_batching = continuous_batching
14081408
self.model.qaic_config = qaic_config
1409-
1409+
self.pretrained_model_name_or_path = kwargs.pop("pretrained_model_name_or_path", None)
14101410
self.model, transformed = SpDTransform.apply(self.model, qaic_config, **kwargs)
14111411
self.is_tlm = transformed
1412-
self.pretrained_model_name_or_path = kwargs.get("pretrained_model_name_or_path", None)
14131412

14141413
# ---Sampling---
14151414
# Note: SamplerTransform should be applied after all other transforms

QEfficient/transformers/models/pytorch_transforms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ class SpDTransform:
500500
@classmethod
501501
def apply(cls, model: nn.Module, qaic_config: Optional[dict] = None, **kwargs) -> Tuple[nn.Module, bool]:
502502
transformed = False
503-
kwargs.pop("pretrained_model_name_or_path", None)
504503

505504
if qaic_config is None or (speculative_model_type := qaic_config.get("speculative_model_type")) is None:
506505
return model, transformed

0 commit comments

Comments
 (0)