Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ model_path = 'THUDM/BPO'
|
|
11 |
device = 'cuda'
|
12 |
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True, add_prefix_space=True)
|
14 |
-
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True).to(device)
|
15 |
model = model.eval()
|
16 |
|
17 |
prompt_template = "[INST] You are an expert prompt engineer. Please help me improve this prompt to get a more helpful and harmless response:\n{} [/INST]"
|
|
|
11 |
device = 'cuda'
|
12 |
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True, add_prefix_space=True)
|
14 |
+
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True, load_in_8bit=True).to(device)
|
15 |
model = model.eval()
|
16 |
|
17 |
prompt_template = "[INST] You are an expert prompt engineer. Please help me improve this prompt to get a more helpful and harmless response:\n{} [/INST]"
|