inseq
inseq copied to clipboard
Update lime.py
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.