gregH commited on
Commit
807e442
1 Parent(s): aa4aa8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -146,7 +146,7 @@ def gradient_cuff_reject(message,with_defense, sample_times,perturb_times,thresh
146
  original_embedding,shift_embeddings,prefix_embedding,suffix_embedding
147
  )
148
  with torch.no_grad():
149
- responses = engine(input_embeds)
150
  labels=get_labels(responses)
151
  results=[None for _ in range(perturb_times+1)]
152
  results[0]=sum(labels)/len(labels)
 
146
  original_embedding,shift_embeddings,prefix_embedding,suffix_embedding
147
  )
148
  with torch.no_grad():
149
+ responses = engine(input_embeds.to(torch.bfloat16))
150
  labels=get_labels(responses)
151
  results=[None for _ in range(perturb_times+1)]
152
  results[0]=sum(labels)/len(labels)