fix an import error (#1767)
* fix an import error * Delete .gitignore * Update loader.py * Update save.py --------- Co-authored-by: Daniel Han <danielhanchen@gmail.com>
This commit is contained in:
parent
abeb373878
commit
d95f5782d0
2 changed files with 14 additions and 6 deletions
|
|
@ -24,10 +24,14 @@ from peft import PeftConfig, PeftModel
|
|||
from .loader_utils import get_model_name
|
||||
import os, contextlib, sys
|
||||
try:
|
||||
from huggingface_hub.utils import get_token
|
||||
from huggingface_hub import get_token
|
||||
except:
|
||||
# Old HF Hub versions <= 0.0.25
|
||||
from huggingface_hub.utils._token import get_token
|
||||
try:
|
||||
from huggingface_hub.utils import get_token
|
||||
except:
|
||||
# For older versions of huggingface_hub
|
||||
from huggingface_hub.utils._token import get_token
|
||||
pass
|
||||
pass
|
||||
from huggingface_hub import HfFileSystem
|
||||
import importlib.util
|
||||
|
|
|
|||
|
|
@ -31,10 +31,14 @@ from transformers.models.llama.modeling_llama import logger
|
|||
from .tokenizer_utils import fix_sentencepiece_gguf
|
||||
from huggingface_hub import HfApi
|
||||
try:
|
||||
from huggingface_hub.utils import get_token
|
||||
from huggingface_hub import get_token
|
||||
except:
|
||||
# Old HF Hub versions <= 0.0.25
|
||||
from huggingface_hub.utils._token import get_token
|
||||
try:
|
||||
from huggingface_hub.utils import get_token
|
||||
except:
|
||||
# For older versions of huggingface_hub
|
||||
from huggingface_hub.utils._token import get_token
|
||||
pass
|
||||
pass
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue