Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tensorrt_llm/_torch/auto_deploy/models/patches/phi.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ def _patched_phi3_long_emb_init(
self,
):
_patched_phi3_emb_init(self)
self.ext_factors = torch.tensor(
ext_factors_tensor = torch.tensor(
self.short_factor, dtype=torch.float32, device=torch.device("cpu")
)
self._buffers.pop("ext_factors", None)
self.register_buffer("ext_factors", ext_factors_tensor, persistent=False)


# Copied from https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/blob/main/modeling_phi3.py#L151
Expand Down