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

RuntimeError: value cannot be converted to type at::Half without overflow #2

Open
jeffxtang opened this issue Sep 25, 2023 · 0 comments

Comments

@jeffxtang
Copy link

I followed the fine-tune-code-llama.ipynb and got an error when running trainer.train():

File ~/anaconda3/envs/codallama/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py:50, in make_causal_mask(input_ids_shape, dtype, device, past_key_values_length)
46 """
47 Make causal mask used for bi-directional self-attention.
48 """
49 bsz, tgt_len = input_ids_shape
---> 50 mask = torch.full((tgt_len, tgt_len), torch.finfo(dtype).min, device=device)
51 mask_cond = torch.arange(mask.size(-1), device=device)
52 mask.masked_fill(mask_cond < (mask_cond + 1).view(mask.size(-1), 1), 0)

RuntimeError: value cannot be converted to type at::Half without overflow

My transformers version is 4.34.0.dev0 and accelerate is >=0.23.0. Any ideas? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant