mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 14:17:28 +00:00
Autodetect llamacpp_HF loader when tokenizer exists
This commit is contained in:
parent
76d28eaa9e
commit
4039999be5
2 changed files with 4 additions and 2 deletions
|
|
@ -257,7 +257,7 @@ def llamacpp_HF_loader(model_name):
|
|||
path = Path(f'{shared.args.model_dir}/{model_name}')
|
||||
|
||||
# Check if a HF tokenizer is available for the model
|
||||
if all((path / file).exists() for file in ['tokenizer.json', 'tokenizer_config.json']):
|
||||
if all((path / file).exists() for file in ['tokenizer_config.json']):
|
||||
logger.info(f'Using tokenizer from: \"{path}\"')
|
||||
else:
|
||||
logger.error("Could not load the model because a tokenizer in Transformers format was not found.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue