Skip to content

Commit

Permalink
Fix loading GPTQ model from a local file or directory (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: James Zhong <[email protected]>
  • Loading branch information
jameschung2000 and James Zhong committed Aug 8, 2023
1 parent d537788 commit fc602d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ctransformers/gptq/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def from_pretrained(

model_path = None
if path_type == "file":
model_path = Path(model_path).parent
model_path = Path(model_path_or_repo_id).parent
elif path_type == "dir" :
model_path = Path(model_path_or_repo_id)
elif path_type == "repo":
model_path = snapshot_download(
repo_id=model_path_or_repo_id,
Expand Down

0 comments on commit fc602d1

Please sign in to comment.