Skip to content

Update lime.py#262

Open
yuzhaouoe wants to merge 1 commit intoinseq-team:mainfrom
yuzhaouoe:main
Open

Update lime.py#262
yuzhaouoe wants to merge 1 commit intoinseq-team:mainfrom
yuzhaouoe:main

Conversation

@yuzhaouoe
Copy link

Convert tensor's dtype to "float" before moving to CPU, which avoids errors when using "bf16"

Description

add .float() before .cpu() to support half precision data type

Checklist

  • I've read the CODE_OF_CONDUCT.md document.
  • I've read the CONTRIBUTING.md guide.
  • I've successfully run the style checks using make fix-style.
  • I've written tests for all new methods and classes that I created and successfully ran make test.
  • I've written the docstring in Google format for all the methods and classes that I used.

Convert tensor's dtype to "float" before moving to CPU, which avoids errors when using "bf16"
@gsarti
Copy link
Member

gsarti commented Apr 15, 2024

Hi @yuzhaouoe, thanks for opening this PR! Could you provide a minimal code snippet to reproduce the issue with bfloat16 you mention?

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

Successfully merging this pull request may close these issues.

2 participants