Skip to content

Commit

Permalink
added generation configs to models
Browse files Browse the repository at this point in the history
  • Loading branch information
clefourrier committed Dec 9, 2024
1 parent bfcc4af commit dc90c92
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lighteval/models/endpoints/endpoint_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class InferenceEndpointModelConfig:
namespace: str = None # The namespace under which to launch the endopint. Defaults to the current user's namespace
image_url: str = None
env_vars: dict = None
generation_config: dict = {}
generation_config: dict = dict

def __post_init__(self):
# xor operator, one is None but not the other
Expand Down
2 changes: 1 addition & 1 deletion src/lighteval/models/endpoints/openai_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
@dataclass
class OpenAIModelConfig:
model: str
sampling_params: dict = {}
sampling_params: dict = dict


class OpenAIClient(LightevalModel):
Expand Down
2 changes: 1 addition & 1 deletion src/lighteval/models/endpoints/tgi_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TGIModelConfig:
inference_server_address: str
inference_server_auth: str
model_id: str
generation_config: dict = {}
generation_config: dict = dict


# inherit from InferenceEndpointModel instead of LightevalModel since they both use the same interface, and only overwrite
Expand Down
2 changes: 1 addition & 1 deletion src/lighteval/models/transformers/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class BaseModelConfig:
trust_remote_code: bool = False
use_chat_template: bool = False
compile: bool = False
generation_config: dict = {}
generation_config: dict = dict

def __post_init__(self):
# Making sure this parameter is a boolean
Expand Down

0 comments on commit dc90c92

Please sign in to comment.