Skip to content

Commit

Permalink
OAI: Add draft model dir to inline load
Browse files Browse the repository at this point in the history
Was not pushed before and caused errors of the kwargs being None.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Oct 22, 2024
1 parent fba462f commit e78ffce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backends/exllamav2/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ async def set_model_overrides(self, **kwargs):
if draft_override_args:
kwargs["draft_model"] = {
**draft_override_args,
**kwargs.get("draft_model"),
**unwrap(kwargs.get("draft_model"), {}),
}

# Merge the override and model kwargs
Expand Down
7 changes: 5 additions & 2 deletions endpoints/OAI/utils/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,11 @@ async def load_inline_model(model_name: str, request: Request):

return

# Load the model
await model.load_model(model_path)
# Load the model and also add draft dir
await model.load_model(
model_path,
draft_model=config.draft_model.model_dump(include={"draft_model_dir"}),
)


async def stream_generate_completion(
Expand Down

0 comments on commit e78ffce

Please sign in to comment.