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 2222
2323import asyncio
2424import logging
25- from dataclasses import field
2625from typing import Any , List , Optional
2726
2827import yaml
2928from huggingface_hub import AsyncInferenceClient , ChatCompletionOutput
30- from pydantic import BaseModel , NonNegativeInt
29+ from pydantic import NonNegativeInt
3130from tqdm import tqdm
3231from tqdm .asyncio import tqdm as async_tqdm
3332from transformers import AutoTokenizer
4140 LoglikelihoodResponse ,
4241 LoglikelihoodSingleTokenResponse ,
4342)
43+ from lighteval .models .utils import ModelConfig
4444from lighteval .tasks .requests import (
4545 GreedyUntilRequest ,
4646 LoglikelihoodRequest ,
5252logger = logging .getLogger (__name__ )
5353
5454
55- class InferenceProvidersModelConfig (BaseModel ):
55+ class InferenceProvidersModelConfig (ModelConfig ):
5656 """Configuration for InferenceProvidersClient.
5757
5858 Args:
@@ -68,7 +68,6 @@ class InferenceProvidersModelConfig(BaseModel):
6868 timeout : int | None = None
6969 proxies : Any | None = None
7070 parallel_calls_count : NonNegativeInt = 10
71- generation_parameters : GenerationParameters = field (default_factory = GenerationParameters )
7271
7372 @classmethod
7473 def from_path (cls , path ):
You can’t perform that action at this time.
0 commit comments