Skip to content

Commit

Permalink
set n_gpu_layers to -1 for Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv authored Feb 11, 2024
1 parent 0bff58f commit cda14d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlcoder/query_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
hf_hub_download(repo_id="defog/sqlcoder-7b-2", filename="sqlcoder-7b-q5_k_m.gguf", local_dir=defog_path)

if device_type == "apple_silicon":
llm = Llama(model_path=filepath, n_gpu_layers=1, n_ctx=4096)
llm = Llama(model_path=filepath, n_gpu_layers=-1, n_ctx=4096)
else:
llm = Llama(model_path=filepath, n_ctx=4096)

Expand Down Expand Up @@ -124,4 +124,4 @@ async def query(request: Request):
"data": data,
"columns": columns,
"ran_successfully": True
}
}

0 comments on commit cda14d1

Please sign in to comment.