Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,12 @@ base = AutoModelForCausalLM.from_pretrained(
|
|
| 18 |
MODEL, revision=REVISION, dtype=torch.float32,
|
| 19 |
attn_implementation="eager",
|
| 20 |
)
|
| 21 |
-
model = PeftModel.from_pretrained(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
def reply(text):
|
| 24 |
messages = [
|
|
|
|
| 18 |
MODEL, revision=REVISION, dtype=torch.float32,
|
| 19 |
attn_implementation="eager",
|
| 20 |
)
|
| 21 |
+
model = PeftModel.from_pretrained(
|
| 22 |
+
base,
|
| 23 |
+
"adapter",
|
| 24 |
+
torch_device="cpu",
|
| 25 |
+
is_trainable=False,
|
| 26 |
+
).eval()
|
| 27 |
|
| 28 |
def reply(text):
|
| 29 |
messages = [
|