Update README.md
Browse files
README.md
CHANGED
|
@@ -41,7 +41,7 @@ solution = ["To convert a string to an integer in Python 3, we use the built-in
|
|
| 41 |
"Looking at the options, we can see that the correct function is option E: int(x [,base]).",
|
| 42 |
"The answer is (E)."]
|
| 43 |
input_text = question + ' \n\n' + ' \n\n\n\n'.join(solution) + ' \n\n\n\n' # solution steps are separated by ' \n\n\n\n'
|
| 44 |
-
input_id = torch.tensor([
|
| 45 |
|
| 46 |
with torch.no_grad():
|
| 47 |
logits = model(input_id).logits[:,:,candidate_tokens]
|
|
|
|
| 41 |
"Looking at the options, we can see that the correct function is option E: int(x [,base]).",
|
| 42 |
"The answer is (E)."]
|
| 43 |
input_text = question + ' \n\n' + ' \n\n\n\n'.join(solution) + ' \n\n\n\n' # solution steps are separated by ' \n\n\n\n'
|
| 44 |
+
input_id = torch.tensor([tokenizer.encode(input_text)]).to(device)
|
| 45 |
|
| 46 |
with torch.no_grad():
|
| 47 |
logits = model(input_id).logits[:,:,candidate_tokens]
|