Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -140,7 +140,7 @@ def main():
|
|
140 |
|
141 |
if ptuning_checkpoint is not None:
|
142 |
print(f"Loading prefix_encoder weight from {ptuning_checkpoint}")
|
143 |
-
model = AutoModel.from_pretrained(
|
144 |
prefix_state_dict = torch.load(os.path.join(ptuning_checkpoint, "pytorch_model.bin"))
|
145 |
new_prefix_state_dict = {}
|
146 |
for k, v in prefix_state_dict.items():
|
|
|
140 |
|
141 |
if ptuning_checkpoint is not None:
|
142 |
print(f"Loading prefix_encoder weight from {ptuning_checkpoint}")
|
143 |
+
model = AutoModel.from_pretrained("THUDM/chatglm-6b", config=config, trust_remote_code=True)
|
144 |
prefix_state_dict = torch.load(os.path.join(ptuning_checkpoint, "pytorch_model.bin"))
|
145 |
new_prefix_state_dict = {}
|
146 |
for k, v in prefix_state_dict.items():
|