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.

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.0

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.0
File Size Uploaded
saina-0.1.0.tar.gz 20.2 kB Details

Built distribution (wheel)

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

Total release size: 39.8 kB

Release files / saina-0.1.0.tar.gz

Download URL saina-0.1.0.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c110ef185aca2f9322e3d8445daa61e14038c3a4e428258c65a6320f30216fe4
BLAKE2b-256 checksum
How to use checksums
935c7e4a75b567710370fde59112e6026afd46e5f62cb45da5ab3959e154a9a4
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.0-py3-none-any.whl

Download URL saina-0.1.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8a4a2d50bddca13cf5e9391b7f8181cd390ce2afd2879120686f0b9de4f84dc
BLAKE2b-256 checksum
How to use checksums
e4349241421f3dd2cf9d4acb0c49d784b33734e81a24bf8635cf2aaf8014912e
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

0.1.1

2 release files

This release

0.1.0 This release

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