travisnp
commited on
Commit
·
0794de7
1
Parent(s):
fe5bca2
Update test and gitignore
Browse files- .gitignore +1 -0
- llamatest.py +3 -2
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.vscode/launch.json
|
llamatest.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import torch
|
| 3 |
import os
|
| 4 |
-
from tot.models import
|
|
|
|
| 5 |
|
| 6 |
os.environ["HF_TOKEN"] = os.getenv("HUGGINGTOKEN")
|
| 7 |
|
|
@@ -16,7 +17,7 @@ def testThoughtGeneration():
|
|
| 16 |
device_map="auto",
|
| 17 |
)
|
| 18 |
my_propose_prompt20 = 'Input: 2 8 8 14\nPossible next steps:\n2 + 8 = 10 (left: 8 10 14)\n8 / 2 = 4 (left: 4 8 14)\n14 + 2 = 16 (left: 8 8 16)\n2 * 8 = 16 (left: 8 14 16)\n8 - 2 = 6 (left: 6 8 14)\n14 - 8 = 6 (left: 2 6 8)\n14 / 2 = 7 (left: 7 8 8)\n14 - 2 = 12 (left: 8 8 12)\nInput: 4 5 6 10\nPossible next steps:\n'
|
| 19 |
-
result =
|
| 20 |
print(result)
|
| 21 |
|
| 22 |
testThoughtGeneration()
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import torch
|
| 3 |
import os
|
| 4 |
+
from tot.models import gpt24
|
| 5 |
+
from tot.methods.bfs import get_proposals
|
| 6 |
|
| 7 |
os.environ["HF_TOKEN"] = os.getenv("HUGGINGTOKEN")
|
| 8 |
|
|
|
|
| 17 |
device_map="auto",
|
| 18 |
)
|
| 19 |
my_propose_prompt20 = 'Input: 2 8 8 14\nPossible next steps:\n2 + 8 = 10 (left: 8 10 14)\n8 / 2 = 4 (left: 4 8 14)\n14 + 2 = 16 (left: 8 8 16)\n2 * 8 = 16 (left: 8 14 16)\n8 - 2 = 6 (left: 6 8 14)\n14 - 8 = 6 (left: 2 6 8)\n14 / 2 = 7 (left: 7 8 8)\n14 - 2 = 12 (left: 8 8 12)\nInput: 4 5 6 10\nPossible next steps:\n'
|
| 20 |
+
result = gpt24(my_propose_prompt20, model_pipeline, max_tokens=1000, n=1)
|
| 21 |
print(result)
|
| 22 |
|
| 23 |
testThoughtGeneration()
|