Skip to content

Commit

Permalink
app.py: add --device option for GPU support (nomic-ai#1769)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Salvatierra <[email protected]>
Co-authored-by: Jared Van Bortel <[email protected]>
  • Loading branch information
dpsalvatierra and cebtenzzre authored Dec 20, 2023
1 parent 528eb1e commit c72c73a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gpt4all-bindings/cli/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ def repl(
int,
typer.Option("--n-threads", "-t", help="Number of threads to use for chatbot"),
] = None,
device: Annotated[
str,
typer.Option("--device", "-d", help="Device to use for chatbot, e.g. gpu, amd, nvidia, intel. Defaults to CPU."),
] = None,
):
"""The CLI read-eval-print loop."""
gpt4all_instance = GPT4All(model)
gpt4all_instance = GPT4All(model, device=device)

# if threads are passed, set them
if n_threads is not None:
Expand Down

0 comments on commit c72c73a

Please sign in to comment.