Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanHB committed Sep 2, 2024
1 parent d0b46e9 commit 97632d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/lighteval/models/model_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ def create_model_config( # noqa: C901
if model_args.pop("dummy", False):
return DummyModelConfig(**model_args)

if model_args.pop("vllm", False):
return VLLMModelConfig(**model_args)

model_args["accelerator"] = accelerator
model_args["use_chat_template"] = use_chat_template
model_args["compile"] = bool(model_args["compile"]) if "compile" in model_args else False
Expand Down
6 changes: 3 additions & 3 deletions src/lighteval/models/vllm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
GenerativeResponse,
LoglikelihoodResponse,
)
from lighteval.models.utils import _simplify_name
from lighteval.models.utils import _get_dtype, _simplify_name
from lighteval.tasks.requests import (
GreedyUntilRequest,
LoglikelihoodRequest,
Expand Down Expand Up @@ -76,9 +76,9 @@ def __init__(

self.model_name = _simplify_name(config.pretrained)
self.model_sha = "" # config.get_model_sha()
self.precision = "float16" # _get_dtype(config.dtype, config=self._config)
self.precision = _get_dtype(config.dtype, config=self._config)

self.model_info = ModelInfo()
self.model_info = ModelInfo(model_name=self.model_name, model_sha=self.model_sha)

@property
def tokenizer(self):
Expand Down

0 comments on commit 97632d9

Please sign in to comment.