You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import os
|
|
from typing import Union
|
|
|
|
|
|
def always_needs_auth(model_name: Union[str, os.PathLike, None]) -> bool:
|
|
loading_from_repo = model_name is not None and not os.path.isdir(model_name)
|
|
return loading_from_repo and model_name.startswith("meta-llama/Llama-2-")
|