Instructions to use dongboklee/dPRM-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dongboklee/dPRM-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dongboklee/dPRM-8B")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dongboklee/dPRM-8B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add paper ID to metadata
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
---
|
| 2 |
base_model: deepseek-ai/DeepSeek-R1-Distill-Llama-8B
|
|
|
|
|
|
|
| 3 |
library_name: transformers
|
|
|
|
|
|
|
| 4 |
pipeline_tag: text-classification
|
| 5 |
tags:
|
| 6 |
- base_model:adapter:deepseek-ai/DeepSeek-R1-Distill-Llama-8B
|
| 7 |
- lora
|
| 8 |
- transformers
|
| 9 |
- reward-model
|
| 10 |
-
license: apache-2.0
|
| 11 |
-
language:
|
| 12 |
-
- en
|
| 13 |
---
|
| 14 |
|
| 15 |
# dPRM-8B
|
|
@@ -40,7 +41,11 @@ candidate_tokens = [
|
|
| 40 |
self.tokenizer.encode("-", add_special_tokens=False)[-1],
|
| 41 |
self.tokenizer.encode("+", add_special_tokens=False)[-1]
|
| 42 |
]
|
| 43 |
-
tag_id = self.tokenizer.encode("
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
# model
|
| 46 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
@@ -48,13 +53,37 @@ model = AutoModelForCausalLM.from_pretrained('dongboklee/dPRM-8B')
|
|
| 48 |
model.eval()
|
| 49 |
model.to(device)
|
| 50 |
|
| 51 |
-
question = 'Question: In Python 3, which of the following function convert a string to an int in python?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
solution = ["To convert a string to an integer in Python 3, we use the built-in function int().",
|
| 53 |
"The int() function takes two arguments: the string to be converted and an optional base (default is 10, which is for decimal).",
|
| 54 |
"For example: int(\"123\", 10) converts the string \"123\" to the integer 123.",
|
| 55 |
"Looking at the options, we can see that the correct function is option E: int(x [,base]).",
|
| 56 |
"The answer is (E)."]
|
| 57 |
-
input_text = question + '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
input_id = torch.tensor([tokenizer.encode(input_text)]).to(device)
|
| 59 |
|
| 60 |
with torch.no_grad():
|
|
@@ -73,4 +102,4 @@ with torch.no_grad():
|
|
| 73 |
journal = {arXiv preprint arXiv:2510.00492},
|
| 74 |
year = {2025}
|
| 75 |
}
|
| 76 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
base_model: deepseek-ai/DeepSeek-R1-Distill-Llama-8B
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
library_name: transformers
|
| 6 |
+
license: apache-2.0
|
| 7 |
+
paper: 2510.00492
|
| 8 |
pipeline_tag: text-classification
|
| 9 |
tags:
|
| 10 |
- base_model:adapter:deepseek-ai/DeepSeek-R1-Distill-Llama-8B
|
| 11 |
- lora
|
| 12 |
- transformers
|
| 13 |
- reward-model
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
# dPRM-8B
|
|
|
|
| 41 |
self.tokenizer.encode("-", add_special_tokens=False)[-1],
|
| 42 |
self.tokenizer.encode("+", add_special_tokens=False)[-1]
|
| 43 |
]
|
| 44 |
+
tag_id = self.tokenizer.encode("
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
", add_special_tokens=False)[-1]
|
| 49 |
|
| 50 |
# model
|
| 51 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
|
|
| 53 |
model.eval()
|
| 54 |
model.to(device)
|
| 55 |
|
| 56 |
+
question = 'Question: In Python 3, which of the following function convert a string to an int in python?
|
| 57 |
+
A. short(x)
|
| 58 |
+
B. float(x)
|
| 59 |
+
C. integer(x [,base])
|
| 60 |
+
D. double(x)
|
| 61 |
+
E. int(x [,base])
|
| 62 |
+
F. long(x [,base] )
|
| 63 |
+
G. num(x)
|
| 64 |
+
H. str(x)
|
| 65 |
+
I. char(x)
|
| 66 |
+
J. digit(x [,base])'
|
| 67 |
solution = ["To convert a string to an integer in Python 3, we use the built-in function int().",
|
| 68 |
"The int() function takes two arguments: the string to be converted and an optional base (default is 10, which is for decimal).",
|
| 69 |
"For example: int(\"123\", 10) converts the string \"123\" to the integer 123.",
|
| 70 |
"Looking at the options, we can see that the correct function is option E: int(x [,base]).",
|
| 71 |
"The answer is (E)."]
|
| 72 |
+
input_text = question + '
|
| 73 |
+
|
| 74 |
+
' + '
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
'.join(solution) + '
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
' # solution steps are separated by '
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
'
|
| 87 |
input_id = torch.tensor([tokenizer.encode(input_text)]).to(device)
|
| 88 |
|
| 89 |
with torch.no_grad():
|
|
|
|
| 102 |
journal = {arXiv preprint arXiv:2510.00492},
|
| 103 |
year = {2025}
|
| 104 |
}
|
| 105 |
+
```
|