Marlon Wiprud
commited on
Commit
•
693f1b3
1
Parent(s):
4fbf700
chore: update
Browse files- handler.py +11 -11
handler.py
CHANGED
@@ -25,17 +25,17 @@ class EndpointHandler:
|
|
25 |
|
26 |
self.tokenizer = LlamaTokenizer.from_pretrained("lmsys/vicuna-7b-v1.5")
|
27 |
|
28 |
-
with init_empty_weights():
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
|
40 |
device_map = infer_auto_device_map(
|
41 |
model,
|
|
|
25 |
|
26 |
self.tokenizer = LlamaTokenizer.from_pretrained("lmsys/vicuna-7b-v1.5")
|
27 |
|
28 |
+
# with init_empty_weights():
|
29 |
+
# self.model = (
|
30 |
+
# AutoModelForCausalLM.from_pretrained(
|
31 |
+
# "THUDM/cogvlm-chat-hf",
|
32 |
+
# torch_dtype=torch.bfloat16,
|
33 |
+
# low_cpu_mem_usage=True,
|
34 |
+
# trust_remote_code=True,
|
35 |
+
# )
|
36 |
+
# .to("cuda")
|
37 |
+
# .eval()
|
38 |
+
# )
|
39 |
|
40 |
device_map = infer_auto_device_map(
|
41 |
model,
|