add custom handler
Browse files- handler.py +1 -1
- requirements.txt +0 -1
handler.py
CHANGED
@@ -7,7 +7,7 @@ class EndpointHandler:
|
|
7 |
self.model = AutoModel.from_pretrained(
|
8 |
path,
|
9 |
trust_remote_code=True,
|
10 |
-
attn_implementation='sdpa',
|
11 |
torch_dtype=torch.float16
|
12 |
)
|
13 |
self.model = self.model.eval().cuda()
|
|
|
7 |
self.model = AutoModel.from_pretrained(
|
8 |
path,
|
9 |
trust_remote_code=True,
|
10 |
+
attn_implementation='sdpa', # Using sdpa instead of flash_attention_2
|
11 |
torch_dtype=torch.float16
|
12 |
)
|
13 |
self.model = self.model.eval().cuda()
|
requirements.txt
CHANGED
@@ -3,4 +3,3 @@ torch==2.1.2
|
|
3 |
torchvision==0.16.2
|
4 |
transformers==4.40.0
|
5 |
sentencepiece==0.1.99
|
6 |
-
flash-attn==2.3.6
|
|
|
3 |
torchvision==0.16.2
|
4 |
transformers==4.40.0
|
5 |
sentencepiece==0.1.99
|
|