Skip to content

Commit 10618bc

Browse files
authored
[QEff. Finetune] : Use login_and_download_hf_lm in finetuning path (quic#232)
Use login_and_download_hf_lm function in finetuning path --------- Signed-off-by: Mamta Singh <[email protected]>
1 parent 2904183 commit 10618bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

QEfficient/cloud/finetune.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
get_preprocessed_dataset,
3131
)
3232
from QEfficient.finetune.utils.train_utils import get_longest_seq_length, print_model_size, train
33+
from QEfficient.utils._utils import login_and_download_hf_lm
3334

3435
try:
3536
import torch_qaic # noqa: F401
@@ -76,8 +77,9 @@ def main(**kwargs):
7677

7778
# Load the pre-trained model and setup its configuration
7879
# config = AutoConfig.from_pretrained(train_config.model_name)
80+
pretrained_model_path = login_and_download_hf_lm(train_config.model_name)
7981
model = AutoModelForCausalLM.from_pretrained(
80-
train_config.model_name,
82+
pretrained_model_path,
8183
use_cache=False,
8284
attn_implementation="sdpa",
8385
torch_dtype=torch.float16,

0 commit comments

Comments
 (0)