Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/model_configs/litellm_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ model_parameters:
model_name: "openai/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B"
provider: "openai"
base_url: "https://router.huggingface.co/hf-inference/v1"
concurrent_requests: 10 # Configure the number of concurrent API requests
generation_parameters:
temperature: 0.5
max_new_tokens: 256
Expand Down
6 changes: 6 additions & 0 deletions src/lighteval/models/abstract_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class ModelConfig(BaseModel, extra="forbid"):
behavior and context for the model during evaluation.
cache_dir (str):
Directory to cache the model. Defaults to "~/.cache/huggingface/lighteval".
concurrent_requests (int):
Maximum number of concurrent API requests to execute in parallel.
Higher values can improve throughput for batch processing but may hit rate limits
or exhaust API quotas faster. Default is 10.

Methods:
from_path(path: str):
Expand Down Expand Up @@ -83,6 +87,8 @@ class ModelConfig(BaseModel, extra="forbid"):
generation_parameters: GenerationParameters = GenerationParameters()
system_prompt: str | None = None
cache_dir: str = "~/.cache/huggingface/lighteval"
concurrent_requests: int = 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put it in the litellm model config instead of the abstract model ? this is really specific to litellm



@classmethod
def from_path(cls, path: str):
Expand Down
Loading