Skip to main content

Saina

Saina's HTTP SDK, shared decision contract, and optional Helm local inference. Saina is operated by Rama Labs Inc. Website: https://saina.run.

The current model is not cleared for commercial distribution. The Apache-2.0 code license does not grant rights to third-party weights or data.

Open in Colab Try Helm in examples/saina_colab.ipynb: run the Hugging Face weights locally through the SDK pipeline, or call Replicate or your own endpoint.

Install

pip install saina                  # dependency-free HTTP client
pip install 'saina[local,server]'  # local inference and authenticated server

From a checkout, use pip install . or pip install '.[local,server]'.

from saina import Saina

client = Saina('https://your-endpoint.example', api_key='YOUR_KEY')

result = client.ask(
    model='helm-0.8b',
    state='I was charged twice.',
    questions={
        'issue': {
            'type': 'single_choice',
            'question': 'Identify the banking issue.',
            'options': {
                'duplicate': 'duplicate charge',
                'delivery': 'card delivery',
            },
        },
    },
)

Keep credentials in environment variables or a secret manager, not source files.

Transformers / local inference

from saina import register_transformers
from transformers import pipeline

register_transformers()

helm = pipeline(
    'saina-classification',
    model='/path/to/staged/checkpoint',
    device='cuda:0',
    model_kwargs={'device': 'cuda:0'},
)

probabilities = helm({
    'task': 'Identify the banking issue.',
    'input': 'I was charged twice.',
    'choices': ['duplicate charge', 'card delivery'],
    'mode': 'single_label',
})

Use multi_label for independent memberships; output order always follows choices. Lists of requests are supported serially, not optimized tensor batching. Hub loading requires an immutable revision and installed registration code, not remote code. CPU operation is supported by the loader but is not an optimized ONNX release.

JavaScript / TypeScript

Source: clients/javascript; planned registry package: @run-saina/sdk. Exports Saina and SainaError, retaining SainaHelm aliases for compatibility.

Serving and contracts

Set SAINA_API_KEY, SAINA_CHECKPOINT, SAINA_DEVICE and optionally SAINA_REVISION (pinned Hub commit), then:

uvicorn saina.server:create_app --factory --host 127.0.0.1 --port 8000

Native typed requests use /v1/ask. The saina.contract module owns their schema. saina.jev provides the Jev/System One adapter; endpoint wiring is separate. Do not expose a plain HTTP server publicly; place it behind authenticated TLS.

Browsers may call the server from the origins in SAINA_CORS_ORIGINS (comma-separated). The default, https://saina.run, lets the hosted playground talk to your server. Set it to an empty string to disable cross-origin access.

To run the server in Docker or deploy it to a cloud, see run-saina/deploy.

Development

PYTHONPATH=src python -m unittest discover -s tests and cd clients/javascript && npm test.

No training datasets, private history, model weights, or credentials are included.

Developer contact

For integration support and developer enquiries, email dev@saina.run.

Metadata

Release files for saina 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for saina 0.1.1
File Size Uploaded
saina-0.1.1.tar.gz 21.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for saina 0.1.1
File Interpreter ABI Platform
saina-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.4 kB

Release files / saina-0.1.1.tar.gz

Download URL saina-0.1.1.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cfdac31584ac830a6d9bbcf65b414e6e947dca84833638cdfb77006c74b96a04
BLAKE2b-256 checksum
How to use checksums
a4eb22d1aeeb8266ab9bcc60b9f366daf8a7b7fdffc0014c59f75050174ab037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / saina-0.1.1-py3-none-any.whl

Download URL saina-0.1.1-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4efd7ea867258d39d9812e1045fd4a68351862e986a0837d4772d0beec42930e
BLAKE2b-256 checksum
How to use checksums
1ebe74ae7a457654dc51819c4db7918da1ed322b0eeb0d3dcdc698474b1ff3c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page