Text Classification
Transformers
English
cortex
decision-intelligence
system-1
typed-decisions
dynamic-memory
Eval Results (legacy)
Instructions to use siddiVinayaka/Cortex-System-One with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use siddiVinayaka/Cortex-System-One with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="siddiVinayaka/Cortex-System-One")# pip install -U transformers accelerate # Load model directly from transformers import Cortex model = Cortex.from_pretrained("siddiVinayaka/Cortex-System-One", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add confidence & latency to inference.py and update Cortex_system_one(Testing).ipynb
Browse files
Cortex_system_one(Testing).ipynb
CHANGED
|
@@ -65,10 +65,13 @@
|
|
| 65 |
" \"Minor performance overhead from string concatenation\"\n",
|
| 66 |
"]\n\n",
|
| 67 |
"result = predict_decision(model, prompt, options, calibration=calibration, device=device)\n",
|
|
|
|
|
|
|
| 68 |
"print(\"\\n\" + \"=\"*55)\n",
|
| 69 |
"print(f\"\ud83c\udfaf Cortex-System-One Decision : {result['predicted_option']}\")\n",
|
| 70 |
-
"print(f\"\u26a1 Decision Confidence Score : {
|
| 71 |
-
"
|
|
|
|
| 72 |
"print(f\"\ud83d\udcca Full Distribution : {result['probabilities']}\")\n",
|
| 73 |
"print(\"=\"*55)\n"
|
| 74 |
]
|
|
|
|
| 65 |
" \"Minor performance overhead from string concatenation\"\n",
|
| 66 |
"]\n\n",
|
| 67 |
"result = predict_decision(model, prompt, options, calibration=calibration, device=device)\n",
|
| 68 |
+
"confidence = result.get('confidence', result['probabilities'][result['predicted_option']])\n",
|
| 69 |
+
"latency = result.get('latency_ms', None)\n\n",
|
| 70 |
"print(\"\\n\" + \"=\"*55)\n",
|
| 71 |
"print(f\"\ud83c\udfaf Cortex-System-One Decision : {result['predicted_option']}\")\n",
|
| 72 |
+
"print(f\"\u26a1 Decision Confidence Score : {confidence*100:.2f}%\")\n",
|
| 73 |
+
"if latency is not None:\n",
|
| 74 |
+
" print(f\"\u23f1\ufe0f Decision Latency : {latency:.2f} ms\")\n",
|
| 75 |
"print(f\"\ud83d\udcca Full Distribution : {result['probabilities']}\")\n",
|
| 76 |
"print(\"=\"*55)\n"
|
| 77 |
]
|