Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -167,7 +167,7 @@ def gradient_cuff_reject(message,with_defense, sample_times,perturb_times,thresh
|
|
167 |
original_embedding,shift_embeddings,prefix_embedding,suffix_embedding
|
168 |
)
|
169 |
with torch.no_grad():
|
170 |
-
responses = engine(input_embeds.to(torch.bfloat16)
|
171 |
for idx in range(perturb_times):
|
172 |
labels=get_labels(
|
173 |
responses[idx*sample_times:(idx+1)*sample_times]
|
|
|
167 |
original_embedding,shift_embeddings,prefix_embedding,suffix_embedding
|
168 |
)
|
169 |
with torch.no_grad():
|
170 |
+
responses = engine(input_embeds.to(torch.bfloat16))
|
171 |
for idx in range(perturb_times):
|
172 |
labels=get_labels(
|
173 |
responses[idx*sample_times:(idx+1)*sample_times]
|