Metadata-Version: 2.4
Name: vera-s1
Version: 0.1.2
Summary: vera-spark and vera-core: calibrated System One decision models
License-Expression: Apache-2.0
Project-URL: vera-spark, https://huggingface.co/scar-ai/vera-spark
Project-URL: vera-core, https://huggingface.co/scar-ai/vera-core
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.4
Requires-Dist: transformers>=5.0
Requires-Dist: huggingface_hub>=0.25
Provides-Extra: fast
Requires-Dist: flash-linear-attention; extra == "fast"

# vera-s1

Python package and Jev-compatible HTTP server for the **vera** System One decision models:
[vera-spark](https://huggingface.co/scar-ai/vera-spark) (~630M, compact) and
[vera-core](https://huggingface.co/scar-ai/vera-core) (~2B, most accurate).

Give a vera model a state (text or JSON) and typed questions; it returns typed answers with calibrated probabilities
in one forward pass. It never generates text.

```bash
pip install vera-s1            # add [fast] for flash-linear-attention (faster vera-core on GPU)
```

```python
import vera

agent = vera.load("scar-ai/vera-spark")       # or "scar-ai/vera-core"
result = agent.predict(
    "Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan.",
    {"department": {"type": "choice", "instructions": "Which department should handle this?",
                    "criteria": {"billing": "invoices, payments, refunds", "technical": "bugs, outages",
                                 "other": "everything else"}},
     "churn_risk": {"type": "noul", "instructions": "Does the user threaten to cancel or leave?"}})
print(result["answers"])
```

Question types: `choice` (2 to 255 options), `score` (2 to 10 ordered levels) and `noul` (yes/no probability).

## HTTP server

```bash
vera-serve --model scar-ai/vera-core --port 8200
curl -s localhost:8200/v1/systemone -H 'Content-Type: application/json' -d '{
  "state": "I was charged twice. Please fix this ASAP.",
  "questions": {"billing": {"type": "noul", "instructions": "Is this ticket about billing?"}}}'
```

Same request and response shape as Jev's `POST /v1/systemone`. Binds `127.0.0.1` by default and has no
authentication: put it behind your own gateway before exposing it.

Requires Python 3.10+ and transformers 5+. A GPU (CUDA or ROCm) is recommended; Apple MPS is not supported (CPU is
used on Macs).
