Skip to content

Commit

Permalink
[QEff. Finetune] : Use login_and_download_hf_lm in finetuning path (q…
Browse files Browse the repository at this point in the history
…uic#232)

Use login_and_download_hf_lm function in finetuning path

---------

Signed-off-by: Mamta Singh <[email protected]>
  • Loading branch information
quic-mamta authored Jan 22, 2025
1 parent 2904183 commit 10618bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion QEfficient/cloud/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
get_preprocessed_dataset,
)
from QEfficient.finetune.utils.train_utils import get_longest_seq_length, print_model_size, train
from QEfficient.utils._utils import login_and_download_hf_lm

try:
import torch_qaic # noqa: F401
Expand Down Expand Up @@ -76,8 +77,9 @@ def main(**kwargs):

# Load the pre-trained model and setup its configuration
# config = AutoConfig.from_pretrained(train_config.model_name)
pretrained_model_path = login_and_download_hf_lm(train_config.model_name)
model = AutoModelForCausalLM.from_pretrained(
train_config.model_name,
pretrained_model_path,
use_cache=False,
attn_implementation="sdpa",
torch_dtype=torch.float16,
Expand Down

0 comments on commit 10618bc

Please sign in to comment.