inseq icon indicating copy to clipboard operation
inseq copied to clipboard

Update lime.py

Open yuzhaouoe opened this issue 2 months ago • 1 comments

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.

yuzhaouoe avatar Apr 15 '24 12:04 yuzhaouoe