Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
```python
|
| 6 |
+
from transformers import AutoTokenizer
|
| 7 |
+
from transformers import AutoModelForSequenceClassification
|
| 8 |
+
import torch
|
| 9 |
+
|
| 10 |
+
tokenizer=AutoTokenizer.from_pretrain("SunW7777/EpicPRM")
|
| 11 |
+
model=AutoModelForSequenceClassification.from_pretrain("SunW7777/EpicPRM")
|
| 12 |
+
prompt = "### Instruct:\nThe steps in 'Selected steps' are the correct problem-solving steps of the problem, while the steps in 'Next step:' are the next problem-solving steps generated by an AI agent based on the steps in 'Selected steps:'.You need to rate the step in 'Next step:' based on it`s usefulness and correctness.\n\n"
|
| 13 |
+
state="Problem:There are 3 complex numbers $a+bi$, $c+di$, and $e+fi$. If $b=3$, $e=-a-c$, and the sum of the numbers is $2i$, find $d+f$. Selected steps: Step 1: We are given three complex numbers in the form $a+bi$, $c+di$, and $e+fi$. Step 2: We're also given that $b=3$ and $e=-a-c$."
|
| 14 |
+
next_step="Step 3: The sum of the three numbers is given as $2i$, which means $(a+bi) + (c+di) + (e+fi) = 2i$.\n"
|
| 15 |
+
input_text=prompt+state+next_step
|
| 16 |
+
tokenized_input = tokenizer(input_text, return_tensors="pt", max_length=8000, truncation=True).input_ids[0]
|
| 17 |
+
print(model(**tokenized_input))
|
| 18 |
+
```python
|