Closed Kushalamummigatti closed 5 months ago
I had same issue here. Set flash_attention: false
and got working
Setting flash attention false fixed it for me too, thanks @imchkkim
well. we cant use flash attn?
Going back to commit 40a88e8c4a2f32b63df0fe2079f7acfe73329273
on main should work
I had same issue here. Set
flash_attention: false
and got working
Yes this is the only solution. Thanks
Reverting to commit 40a88e8c4a2f32b63df0fe2079f7acfe73329273
and re-running pip3 install -e '.[flash-attn,deepspeed]'
to downgrade Transformers/Accelerate resolved the issue for me. Only reverting to the mentioned commit wasn't enough to solve it for me.
Annoying, but better then disabling flash attention.
Hello @Gryphe @chiragjn , thank you for pointing out that commit. Can anyone confirm this helped them too?
Downgrading transformers to version 4.38 or lower will solve the issue.
pip install transformers==4.38
This error occurs because in transformers version 4.39, the seq_len argument in the LlamaRotaryEmbedding.forward() function was deprecated. You can see the change at https://github.com/huggingface/transformers/commit/ffe60fdcd60c17c3f216694160c2521da90f984c#diff-06392bad3b9e97be9ade60d4ac46f73b6809388f4d507c2ba1384ab872711c51.
In the file axolotl/src/axolotl/monkeypatch/llama_attn_hijack_flash.py, line 290 calls LlamaRotaryEmbedding.forward() with the argument seq_len=kv_seq_len, which is no longer supported in the updated version of transformers.
Will close this thanks to @BMPixel 's PR #1443
Downgrading transformers to version 4.38 or lower will solve the issue.
pip install transformers==4.38
This error occurs because in transformers version 4.39, the seq_len argument in the LlamaRotaryEmbedding.forward() function was deprecated. You can see the change at huggingface/transformers@ffe60fd#diff-06392bad3b9e97be9ade60d4ac46f73b6809388f4d507c2ba1384ab872711c51.
In the file axolotl/src/axolotl/monkeypatch/llama_attn_hijack_flash.py, line 290 calls LlamaRotaryEmbedding.forward() with the argument seq_len=kv_seq_len, which is no longer supported in the updated version of transformers.
thanks, remove param "seq_len", it work
Please check that this issue hasn't been reported before.
Expected Behavior
Model training should run when the command accelerate launch -m axolotl.cli.train test.yaml is used.
Current behaviour
Throwing the error as below return forward_call(*args, kwargs) File "/opt/conda/envs/axolotl/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = module._old_forward(*args, *kwargs) File "/home/aion/axolotl/src/axolotl/monkeypatch/llama_attn_hijack_flash.py", line 442, in flashattn_forward cos, sin = self.rotary_emb( File "/opt/conda/envs/axolotl/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/opt/conda/envs/axolotl/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/opt/conda/envs/axolotl/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, **kwargs) TypeError: LlamaRotaryEmbedding.forward() got an unexpected keyword argument 'seq_len' 0%| | 0/9 [00:01<?, ?it/s] Traceback (most recent call last): File "/opt/conda/envs/axolotl/bin/accelerate", line 8, in
sys.exit(main())
File "/opt/conda/envs/axolotl/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
args.func(args)
File "/opt/conda/envs/axolotl/lib/python3.10/site-packages/accelerate/commands/launch.py", line 1023, in launch_command
simple_launcher(args)
File "/opt/conda/envs/axolotl/lib/python3.10/site-packages/accelerate/commands/launch.py", line 643, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/opt/conda/envs/axolotl/bin/python3.10', '-m', 'axolotl.cli.train', 'test.yaml']' returned non-zero exit status 1.
Steps to reproduce
Run the train command with the yaml file provided
Config yaml
Possible solution
No response
Which Operating Systems are you using?
Python Version
3.10
axolotl branch-commit
OpenAccess-AI-Collective / axolotl
Acknowledgements