Commit
·
5ee8ed9
1
Parent(s):
e234444
Update handler.py
Browse filesincreasing token limit
- handler.py +2 -1
handler.py
CHANGED
@@ -10,7 +10,8 @@ dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] == 8 else torch.
|
|
10 |
class EndpointHandler:
|
11 |
def __init__(self, path=""):
|
12 |
# load the model
|
13 |
-
tokenizer = AutoTokenizer.from_pretrained(path)
|
|
|
14 |
model = AutoModelForCausalLM.from_pretrained(path, device_map="auto", torch_dtype=dtype, trust_remote_code=True)
|
15 |
model.to('cuda:0')
|
16 |
|
|
|
10 |
class EndpointHandler:
|
11 |
def __init__(self, path=""):
|
12 |
# load the model
|
13 |
+
tokenizer = AutoTokenizer.from_pretrained(path)
|
14 |
+
tokenizer..max_seq_len = 8192
|
15 |
model = AutoModelForCausalLM.from_pretrained(path, device_map="auto", torch_dtype=dtype, trust_remote_code=True)
|
16 |
model.to('cuda:0')
|
17 |
|