File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/lighteval/models/endpoints Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 22
22
23
23
import asyncio
24
24
import logging
25
- from dataclasses import field
26
25
from typing import Any , List , Optional
27
26
28
27
import yaml
29
28
from huggingface_hub import AsyncInferenceClient , ChatCompletionOutput
30
- from pydantic import BaseModel , NonNegativeInt
29
+ from pydantic import NonNegativeInt
31
30
from tqdm import tqdm
32
31
from tqdm .asyncio import tqdm as async_tqdm
33
32
from transformers import AutoTokenizer
41
40
LoglikelihoodResponse ,
42
41
LoglikelihoodSingleTokenResponse ,
43
42
)
43
+ from lighteval .models .utils import ModelConfig
44
44
from lighteval .tasks .requests import (
45
45
GreedyUntilRequest ,
46
46
LoglikelihoodRequest ,
52
52
logger = logging .getLogger (__name__ )
53
53
54
54
55
- class InferenceProvidersModelConfig (BaseModel ):
55
+ class InferenceProvidersModelConfig (ModelConfig ):
56
56
"""Configuration for InferenceProvidersClient.
57
57
58
58
Args:
@@ -68,7 +68,6 @@ class InferenceProvidersModelConfig(BaseModel):
68
68
timeout : int | None = None
69
69
proxies : Any | None = None
70
70
parallel_calls_count : NonNegativeInt = 10
71
- generation_parameters : GenerationParameters = field (default_factory = GenerationParameters )
72
71
73
72
@classmethod
74
73
def from_path (cls , path ):
You can’t perform that action at this time.
0 commit comments