Create README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,29 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
base_model:
|
4 |
+
- Cran-May/CohenQu-DeepSeek-R1-Distill-Qwen-1.5B-GRPO-duplicate-fixed-6140715
|
5 |
+
- agentica-org/DeepScaleR-1.5B-Preview
|
6 |
+
- deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
|
7 |
+
---
|
8 |
+
|
9 |
+
## Example Test
|
10 |
+
```python
|
11 |
+
import onnxruntime as ort
|
12 |
+
import numpy as np
|
13 |
+
from transformers import AutoTokenizer
|
14 |
+
|
15 |
+
# Load the tokenizer
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained("CohenQu/DeepSeek-R1-Distill-Qwen-7B-GRPO")
|
17 |
+
|
18 |
+
# Load the ONNX model
|
19 |
+
onnx_model_path = "model.onnx" # Path to your ONNX model
|
20 |
+
session = ort.InferenceSession(onnx_model_path)
|
21 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
22 |
+
inputs = tokenizer(question, return_tensors="np", padding=True)
|
23 |
+
output = session.run(
|
24 |
+
None, # Output names can be None to get all outputs
|
25 |
+
{'input_ids': inputs['input_ids'],'attention_mask': inputs['attention_mask']}
|
26 |
+
)[0]
|
27 |
+
generated_text = tokenizer.decode(np.argmax(output, axis=-1)[0], skip_special_tokens=True)
|
28 |
+
print("Generated Text:", generated_text)
|
29 |
+
```
|