-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
ValueError: The following model_kwargs
are not used by the model: ['skip_special_tokens']
#6407
Closed
1 task done
Labels
solved
This problem has been already solved
Comments
The same happens for merging the base model with the LoRA adapter with ### Note: DO NOT use quantized model or quantization_bit when merging lora adapters
### model
model_name_or_path: /c/models/Llama-3.3-70B-Instruct
adapter_name_or_path: saves/llama3.3-70b/lora/sft
template: llama3
finetuning_type: lora
trust_remote_code: true
### export
export_dir: models/llama3_lora_sft
export_size: 2
export_device: cpu
export_legacy_format: false (llama_factory_uat) [x_mlo-app-uat@srp24245lx LLaMA-Factory]$ llamafactory-cli train examples/merge_lora/llama3_lora_sft.yaml
[INFO|2024-12-20 13:52:01] llamafactory.cli:157 >> Initializing distributed tasks at: 127.0.0.1:25334
W1220 13:52:02.151000 2894600 torch/distributed/run.py:793]
W1220 13:52:02.151000 2894600 torch/distributed/run.py:793] *****************************************
W1220 13:52:02.151000 2894600 torch/distributed/run.py:793] Setting OMP_NUM_THREADS environment variable for each process to be 1 in default,
to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
W1220 13:52:02.151000 2894600 torch/distributed/run.py:793] *****************************************
Traceback (most recent call last):
File "/c/packages/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in <module>
launch()
File "/c/packages/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
run_exp()
File "/c/packages/LLaMA-Factory/src/llamafactory/train/tuner.py", line 45, in run_exp
model_args, data_args, training_args, finetuning_args, generating_args = get_train_args(args)
^^^^^^^^^^^^^^^^^^^^
File "/c/packages/LLaMA-Factory/src/llamafactory/hparams/parser.py", line 161, in get_train_args
model_args, data_args, training_args, finetuning_args, generating_args = _parse_train_args(args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/c/packages/LLaMA-Factory/src/llamafactory/hparams/parser.py", line 147, in _parse_train_args
return _parse_args(parser, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/c/packages/LLaMA-Factory/src/llamafactory/hparams/parser.py", line 60, in _parse_args
return parser.parse_yaml_file(os.path.abspath(sys.argv[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/transformers/hf_argparser.py", line 436, in parse_yaml_fil$
outputs = self.parse_dict(yaml.safe_load(Path(yaml_file).read_text()), allow_extra_keys=allow_extra_keys)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/transformers/hf_argparser.py", line 387, in parse_dict
obj = dtype(**inputs)
^^^^^^^^^^^^^^^
TypeError: Seq2SeqTrainingArguments.__init__() missing 1 required positional argument: 'output_dir'
Traceback (most recent call last):
File "/c/packages/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in <module>
launch()
File "/c/packages/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
run_exp()
File "/c/packages/LLaMA-Factory/src/llamafactory/train/tuner.py", line 45, in run_exp
model_args, data_args, training_args, finetuning_args, generating_args = get_train_args(args)
^^^^^^^^^^^^^^^^^^^^
File "/c/packages/LLaMA-Factory/src/llamafactory/hparams/parser.py", line 161, in get_train_args
model_args, data_args, training_args, finetuning_args, generating_args = _parse_train_args(args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/c/packages/LLaMA-Factory/src/llamafactory/hparams/parser.py", line 147, in _parse_train_args
return _parse_args(parser, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/c/packages/LLaMA-Factory/src/llamafactory/hparams/parser.py", line 60, in _parse_args
return parser.parse_yaml_file(os.path.abspath(sys.argv[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/transformers/hf_argparser.py", line 436, in parse_yaml_file
outputs = self.parse_dict(yaml.safe_load(Path(yaml_file).read_text()), allow_extra_keys=allow_extra_keys)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/transformers/hf_argparser.py", line 387, in parse_dict
obj = dtype(**inputs)
^^^^^^^^^^^^^^^
TypeError: Seq2SeqTrainingArguments.__init__() missing 1 required positional argument: 'output_dir'
E1220 13:52:05.958000 2894600 torch/distributed/elastic/multiprocessing/api.py:869] failed (exitcode: 1) local_rank: 0 (pid: 2894617) of binar
y: /c/environments/llama_factory_uat/bin/python3.11
Traceback (most recent call last):
File "/c/environments/llama_factory_uat/bin/torchrun", line 8, in <module>
sys.exit(main())
^^^^^^
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.p
y", line 355, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/torch/distributed/run.py", line 919, in main
run(args)
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/torch/distributed/run.py", line 910, in run
elastic_launch(
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/torch/distributed/launcher/api.py", line 138, in __call__
return launch_agent(self._config, self._entrypoint, list(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/c/environments/llama_factory_uat/lib64/python3.11/site-packages/torch/distributed/launcher/api.py", line 269, in launch_age
nt
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
/c/packages/LLaMA-Factory/src/llamafactory/launcher.py FAILED |
FYI: The same happened using an already quantized model https://huggingface.co/unsloth/Llama-3.3-70B-Instruct-bnb-4bit and I described it this github issue |
hiyouga
added
solved
This problem has been already solved
and removed
pending
This problem is yet to be addressed
labels
Dec 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reminder
System Info
This is my checked out commit:
LLaMA-Factory]$ git log --pretty=format:'%H' -n 1 ffbb4dbdb09ba799af1800c78b2e9d669bccd24b
llamafactory
version: 0.9.2.dev0Reproduction
I have trained a LoRA adapter with the following
examples/train_lora/llama3_lora_sft.yaml
It's the original https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct.
This worked out fine using
llamafactory-cli train examples/train_lora/llama3_lora_sft.yaml
.Then I wanted to evaluate the base model
llamafactory-cli train examples/extras/nlg_eval/llama3_lora_predict.yaml
with the followingexamples/extras/nlg_eval/llama3_lora_predict.yaml
Unfortunately, this fails with the following message:
Expected behavior
No response
Others
No response
The text was updated successfully, but these errors were encountered: