Spaces:
Runtime error
Runtime error
teachyourselfcoding
commited on
Commit
·
5d23840
1
Parent(s):
f61a558
Update generate.py
Browse files- generate.py +3 -3
generate.py
CHANGED
@@ -60,7 +60,7 @@ if device == "cuda":
|
|
60 |
device_map="auto", #device_map={"": 0},
|
61 |
)
|
62 |
model = StreamPeftGenerationMixin.from_pretrained(
|
63 |
-
model,
|
64 |
)
|
65 |
elif device == "mps":
|
66 |
model = LlamaForCausalLM.from_pretrained(
|
@@ -70,7 +70,7 @@ elif device == "mps":
|
|
70 |
)
|
71 |
model = StreamPeftGenerationMixin.from_pretrained(
|
72 |
model,
|
73 |
-
|
74 |
device_map={"": device},
|
75 |
torch_dtype=torch.float16,
|
76 |
)
|
@@ -80,7 +80,7 @@ else:
|
|
80 |
)
|
81 |
model = StreamPeftGenerationMixin.from_pretrained(
|
82 |
model,
|
83 |
-
|
84 |
device_map={"": device},
|
85 |
)
|
86 |
|
|
|
60 |
device_map="auto", #device_map={"": 0},
|
61 |
)
|
62 |
model = StreamPeftGenerationMixin.from_pretrained(
|
63 |
+
model, LORA_PATH, torch_dtype=torch.float16, device_map="auto", #device_map={"": 0}
|
64 |
)
|
65 |
elif device == "mps":
|
66 |
model = LlamaForCausalLM.from_pretrained(
|
|
|
70 |
)
|
71 |
model = StreamPeftGenerationMixin.from_pretrained(
|
72 |
model,
|
73 |
+
LORA_PATH,
|
74 |
device_map={"": device},
|
75 |
torch_dtype=torch.float16,
|
76 |
)
|
|
|
80 |
)
|
81 |
model = StreamPeftGenerationMixin.from_pretrained(
|
82 |
model,
|
83 |
+
LORA_PATH,
|
84 |
device_map={"": device},
|
85 |
)
|
86 |
|