Unverified Commit 3bb646a5 authored by Raushan Turganbay's avatar Raushan Turganbay Committed by GitHub
Browse files

Phi3 tests: fix typing for Python 3.8 (#32388)

fix phi
parent 05ae3a30
......@@ -16,6 +16,7 @@
"""Testing suite for the PyTorch Phi-3 model."""
import unittest
from typing import List
from parameterized import parameterized
......@@ -69,7 +70,7 @@ if is_torch_available():
).logits
@staticmethod
def generate(model: Phi3ForCausalLM, prompt_tokens: torch.LongTensor, max_seq_len: int) -> list[int]:
def generate(model: Phi3ForCausalLM, prompt_tokens: torch.LongTensor, max_seq_len: int) -> List[int]:
model = Phi3MiniWithStaticCache(model, 1, max_seq_len + prompt_tokens.shape[-1])
response_tokens = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment