Text Classification
Transformers
Safetensors
gemma4
image-text-to-text
decision-model
decision-index
system-one
Eval Results (legacy)
Instructions to use MachinePulseAI/karpo-decision-31B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MachinePulseAI/karpo-decision-31B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="MachinePulseAI/karpo-decision-31B")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("MachinePulseAI/karpo-decision-31B") model = AutoModelForMultimodalLM.from_pretrained("MachinePulseAI/karpo-decision-31B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update model card
Browse files
README.md
CHANGED
|
@@ -25,16 +25,14 @@ model-index:
|
|
| 25 |
|
| 26 |
# karpo-decision-31B
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
|
| 33 |
-
- **Base model:** [google/gemma-4-31B-it](https://huggingface.co/google/gemma-4-31B-it)
|
| 34 |
- **Parameters:** 31.3B in bf16, plus a 255 × 5,376 readout in fp32
|
| 35 |
-
- **Questions:** `choice` (
|
| 36 |
-
- **Context:** 32,768 tokens per sequence; a longer request is split
|
| 37 |
-
state
|
| 38 |
- **Licence:** Apache-2.0
|
| 39 |
|
| 40 |
## Lineage
|
|
@@ -44,8 +42,8 @@ single forward pass instead of generated text. It is fine-tuned from
|
|
| 44 |
|
| 45 |
## Use
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
```bash
|
| 51 |
pip install "karpo-decision @ git+https://github.com/machinepulse-ai/karpo-decision"
|
|
@@ -71,13 +69,13 @@ print(response["answers"])
|
|
| 71 |
# "action": {"type": "choice", "choice": <key>, "probabilities": {<key>: p, ...}, "confidence": c}}
|
| 72 |
```
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
```bash
|
| 77 |
torchrun --standalone --nproc_per_node 1 -m karpo_decision.serve.server --checkpoint "$path" --port 18440
|
| 78 |
```
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
```bash
|
| 83 |
python -m decision_index run --engine karpo_decision.serve.engine:DecisionIndexEngine \
|
|
@@ -86,9 +84,8 @@ python -m decision_index run --engine karpo_decision.serve.engine:DecisionIndexE
|
|
| 86 |
|
| 87 |
## Results
|
| 88 |
|
| 89 |
-
Decision Index 0.3
|
| 90 |
-
|
| 91 |
-
(`view=joint`), torch 2.14.1, transformers 5.21.0.
|
| 92 |
|
| 93 |
| | score |
|
| 94 |
|---|---|
|
|
@@ -101,21 +98,18 @@ answered and 11 unsupported (a question that did not fit in 32,768 tokens with i
|
|
| 101 |
| Tools & Automation | 88.32 |
|
| 102 |
| Arts & Human Taste | 68.10 |
|
| 103 |
|
| 104 |
-
The
|
| 105 |
-
once it is published.
|
| 106 |
|
| 107 |
## Limitations
|
| 108 |
|
| 109 |
-
-
|
| 110 |
-
-
|
| 111 |
-
|
| 112 |
-
-
|
| 113 |
-
-
|
| 114 |
-
- It always picks among the given options; it abstains only when an option says so.
|
| 115 |
|
| 116 |
## Licence
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
readout was added.
|
|
|
|
| 25 |
|
| 26 |
# karpo-decision-31B
|
| 27 |
|
| 28 |
+
A decision model: given a state (a web page, a document, a conversation: any text or JSON) and typed questions about
|
| 29 |
+
it, it returns a probability for every option of every question in one forward pass, without generating text.
|
| 30 |
+
Fine-tuned from [google/gemma-4-31B-it](https://huggingface.co/google/gemma-4-31B-it), with a linear readout over the
|
| 31 |
+
options.
|
| 32 |
|
|
|
|
| 33 |
- **Parameters:** 31.3B in bf16, plus a 255 × 5,376 readout in fp32
|
| 34 |
+
- **Questions:** `choice` (up to 255 options), `noul` (true or false), `score` (a level on a scale)
|
| 35 |
+
- **Context:** 32,768 tokens per sequence; a longer request is split by questions, each part with the full state
|
|
|
|
| 36 |
- **Licence:** Apache-2.0
|
| 37 |
|
| 38 |
## Lineage
|
|
|
|
| 42 |
|
| 43 |
## Use
|
| 44 |
|
| 45 |
+
Inference code: [github.com/machinepulse-ai/karpo-decision](https://github.com/machinepulse-ai/karpo-decision). One GPU;
|
| 46 |
+
the weights take 62.5 GB, long requests more.
|
| 47 |
|
| 48 |
```bash
|
| 49 |
pip install "karpo-decision @ git+https://github.com/machinepulse-ai/karpo-decision"
|
|
|
|
| 69 |
# "action": {"type": "choice", "choice": <key>, "probabilities": {<key>: p, ...}, "confidence": c}}
|
| 70 |
```
|
| 71 |
|
| 72 |
+
HTTP server (`POST /v1/systemone`, `GET /healthz`):
|
| 73 |
|
| 74 |
```bash
|
| 75 |
torchrun --standalone --nproc_per_node 1 -m karpo_decision.serve.server --checkpoint "$path" --port 18440
|
| 76 |
```
|
| 77 |
|
| 78 |
+
[Decision Index](https://github.com/apolinario/decision-index) kit:
|
| 79 |
|
| 80 |
```bash
|
| 81 |
python -m decision_index run --engine karpo_decision.serve.engine:DecisionIndexEngine \
|
|
|
|
| 84 |
|
| 85 |
## Results
|
| 86 |
|
| 87 |
+
Decision Index 0.3 public suite, self-reported: 140,178 requests, 11 unsupported (a question over 32,768 tokens with
|
| 88 |
+
its state).
|
|
|
|
| 89 |
|
| 90 |
| | score |
|
| 91 |
|---|---|
|
|
|
|
| 98 |
| Tools & Automation | 88.32 |
|
| 99 |
| Arts & Human Taste | 68.10 |
|
| 100 |
|
| 101 |
+
The Full score (the leaderboard's private tests) will be added once published.
|
|
|
|
| 102 |
|
| 103 |
## Limitations
|
| 104 |
|
| 105 |
+
- Text only: the vision weights are in the checkpoint but unused.
|
| 106 |
+
- Not a chat or text-generation model; generation was not evaluated.
|
| 107 |
+
- Probabilities are not calibrated (temperature 1.0).
|
| 108 |
+
- A question that does not fit in 32,768 tokens with its state is refused, never truncated.
|
| 109 |
+
- It always picks one of the given options.
|
|
|
|
| 110 |
|
| 111 |
## Licence
|
| 112 |
|
| 113 |
+
Apache-2.0 ([LICENSE](LICENSE)), for the weights and the inference code. A modified version of
|
| 114 |
+
[google/gemma-4-31B-it](https://huggingface.co/google/gemma-4-31B-it)
|
| 115 |
+
([Apache-2.0](https://ai.google.dev/gemma/docs/gemma_4_license)): decoder weights fine-tuned, readout added.
|
|
|