Skip to content

Commit

Permalink
Pass 'model_kwargs for outlines.models.llamacpp as dict (#744)
Browse files Browse the repository at this point in the history
Fixes [this issue](#743)
  • Loading branch information
isamu-isozaki authored Mar 14, 2024
1 parent 6484d8c commit 5c15e8c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions outlines/models/llamacpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, model: "Llama"):
def llamacpp(model_path: str, device: Optional[str] = None, **model_kwargs) -> LlamaCpp:
from llama_cpp import Llama

model_kwargs = model_kwargs.get("model_kwargs", {})
if device == "cuda":
model_kwargs["n_gpu_layers"].setdefault(-1)

Expand Down

0 comments on commit 5c15e8c

Please sign in to comment.