nferruz commited on
Commit
4425556
1 Parent(s): afbc64c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -79,7 +79,7 @@ sequence = "<|endoftext|>MGEAMGLTQPAVSRAVARLEERVGIRIFNRTARAITLTDEGRRFYEAVAPLLAGI
79
 
80
  # ppl function
81
  def calculatePerplexity(sequence, model, tokenizer):
82
- input_ids = torch.tensor(tokenizer.encode(sentence)).unsqueeze(0)
83
  input_ids = input_ids.to(device)
84
  with torch.no_grad():
85
  outputs = model(input_ids, labels=input_ids)
 
79
 
80
  # ppl function
81
  def calculatePerplexity(sequence, model, tokenizer):
82
+ input_ids = torch.tensor(tokenizer.encode(sequence)).unsqueeze(0)
83
  input_ids = input_ids.to(device)
84
  with torch.no_grad():
85
  outputs = model(input_ids, labels=input_ids)