Skip to content

Commit

Permalink
Add warning if token is invalid (ggerganov#7173)
Browse files Browse the repository at this point in the history
  • Loading branch information
Galunid committed May 9, 2024
1 parent fd9f92b commit f31ec12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions convert-hf-to-gguf-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class TOKENIZER_TYPE(IntEnum):

if len(sys.argv) == 2:
token = sys.argv[1]
if not token.startswith("hf_"):
logger.info("Huggingface token seems invalid")
logger.info("Usage: python convert-hf-to-gguf-update.py <huggingface_token>")
sys.exit(1)
else:
logger.info("Usage: python convert-hf-to-gguf-update.py <huggingface_token>")
sys.exit(1)
Expand Down

0 comments on commit f31ec12

Please sign in to comment.