Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix non-string deepseed config path bug #11476

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@
from datasets import Dataset, DatasetDict, NamedSplit, Split, load_dataset
from nltk.translate.bleu_score import SmoothingFunction, sentence_bleu
from peft import (
get_peft_model,
PeftConfig,
PeftModelForCausalLM,
get_peft_config
)
from rouge_chinese import Rouge
from torch import nn
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
EvalPrediction,
GenerationConfig,
Expand Down Expand Up @@ -471,7 +473,10 @@ def main(
],
config_file: Annotated[str, typer.Argument(help='')],
# Add below L474, which is path of deepspeed config file to enable finetuning on 2 Intel Arc XPU cards
deepspeed_config_file: Annotated[str, typer.Argument(default='', help='if specified, will apply data parallel')]
deepspeed_config_file: str = typer.Argument(
default='',
help='if specified, will apply data parallel'
),
auto_resume_from_checkpoint: str = typer.Argument(
default='',
help='If entered as yes, automatically use the latest save checkpoint. If it is a numerical example 12 15, use the corresponding save checkpoint. If the input is no, restart training'
Expand Down Expand Up @@ -541,7 +546,7 @@ def main(
use_tokenizer = False if ft_config.peft_config.peft_type == "LORA" else True

# Add below L544-L546 to enable finetuning on 2 Intel Arc XPU cards on top of oneccl and deepspeed
if deepspeed_config_file is not '':
if deepspeed_config_file != '':
ft_config.training_args.ddp_backend = "ccl"
ft_config.training_args.deepspeed = deepspeed_config_file

Expand Down
Loading