FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update lime.py by yuzhaouoe · Pull Request #262 · inseq-team/inseq · GitHub

Repository navigation

Update lime.py - #262

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

yuzhaouoe wants to merge 1 commit into
inseq-team:mainfrom
yuzhaouoe:main

Conversation

Copy link
Copy Markdown

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 commented Apr 15, 2024

Copy link
Copy Markdown
Member

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL