Commit 23e8f8b
committed
Change CLIP dtype management in llama.py
It is probably safer to keep CLIP at its original precision (e.g., fp16)
regardless of the autocast setting: Some casting (e.g., from fp16 to
bf16) may be lossy and can potentially harm the pre-trained model.
Keep the changes to llama.py only at this moment since a lot of copy-
pasted codes may be refactored in the future (#3).1 parent b93d0b6 commit 23e8f8b
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
369 | 371 | | |
370 | 372 | | |
371 | 373 | | |
| |||
0 commit comments