We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9c975f commit f3a8f09Copy full SHA for f3a8f09
olive/evaluator/lmeval_ort.py
@@ -13,10 +13,15 @@
13
import torch.nn.functional as F
14
from lm_eval.api.model import TemplateLM
15
from lm_eval.api.registry import register_model
16
-from lm_eval.models.utils import Collator, pad_and_concat
+from lm_eval.models.utils import Collator
17
from tqdm import tqdm
18
from transformers import AutoConfig, AutoTokenizer
19
20
+try:
21
+ from lm_eval.models.utils_hf import pad_and_concat # pylint: disable=ungrouped-imports
22
+except ImportError:
23
+ from lm_eval.models.utils import pad_and_concat
24
+
25
from olive.common.onnx_io import get_io_config, get_io_dtypes, get_kv_info
26
from olive.common.utils import cleanup_memory
27
0 commit comments