Add flash-attention 2 for windows (#4235)

This commit is contained in:
Brian Dashore 2023-10-21 02:46:23 -04:00 committed by GitHub
parent 258d046218
commit 3345da2ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 139 additions and 110 deletions

View file

@ -1,4 +1,5 @@
import random
import traceback
from pathlib import Path
import torch
@ -24,6 +25,9 @@ except ModuleNotFoundError:
'https://github.com/Dao-AILab/flash-attention#installation-and-features'
)
pass
except Exception:
logger.warning('Failed to load flash-attention due to the following error:\n')
traceback.print_exc()
class Exllamav2Model: