Skip to main content

runara

Fine-tune open models without hosting them. You write the training loop; we hold the base weights and run the forward and backward passes.

pip install "runara[cookbook]"
export RUNARA_API_KEY=rk_live_...
import runara
from runara_cookbook import data, renderers
from transformers import AutoTokenizer

# Tokenized on your machine; only token ids and a loss mask are sent.
renderer = renderers.get("generic", AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct"))
dataset = data.build_data(renderer, data.conversations(data.read_jsonl("my_tickets.jsonl")))

sc = runara.ServiceClient()                      # reads RUNARA_API_KEY
with sc.create_lora_training_client(base_model="qwen-2.5-7b", rank=32) as tc:  # waits for a GPU
    for epoch in range(3):
        for batch in data.batches(dataset, 8, shuffle=True, seed=epoch):
            fb = tc.forward_backward(batch)              # submitted, not awaited
            tc.optim_step(runara.AdamParams(1e-4))       # submitted straight after
            print(fb.result().loss)                      # the loop blocks here
    tc.save_state(name="support-v1").result()

base_model is a slug from the console's Models tab, and the tokenizer is that model's Repository. my_tickets.jsonl holds one {"messages": [{"role": ..., "content": ...}, ...]} per line.

Your data does not leave your machine

open(...) runs on your computer. The cookbook tokenizes locally and builds a per-token loss mask, so what crosses the wire is a list of integers and a list of floats — no text, no filenames, no schema. A two-turn conversation is about 900 bytes of that.

You can check this yourself before sending anything:

datum = renderer.to_datum(messages)
print(datum.token_ids)       # integers
print(datum.weights)         # 0.0 for the prompt, 1.0 for what you train on

What we do keep is the adapter you write with save_state, plus token counts and loss values for billing and the charts in the console.

Why the loop is yours

There is no job to submit and no config to fill in. You decide the batching, the schedule, when to stop, and what the loss means. That is more work than a managed API and it is the point: it is the difference between tuning a model and filling in a form.

forward_backward and optim_step both return immediately. Submit them back to back and collect later — the worker applies calls for a session in the order they arrive, so the round trip overlaps your next batch of tokenization instead of stalling the GPU.

What you get out

for checkpoint in sc.list_checkpoints():
    print(checkpoint.name, checkpoint.size_bytes, checkpoint.base_model)

Checkpoints are standard PEFT adapters — adapter_config.json and adapter_model.safetensors — so they load in vLLM, SGLang or transformers without conversion. Download them from the console, or serve them on Runara alongside the base model.

Errors worth catching

runara.InsufficientBalance The organization is out of credit.
runara.SessionClosed The session ended, or is ending because the balance ran out.
runara.RunaraError Everything else, with .status and .code.

A training call is never retried automatically. One that timed out may already have applied its gradients, and sending it again would train on the same batch twice.

Checked against the reference

The renderers are verified to produce byte-identical tokens, targets and loss masks to tinker-cookbook for the same conversation and tokenizer. Chat templating is the part of fine-tuning that goes wrong silently, so it is checked against an independent implementation rather than only against itself.

Installing

The client has no dependencies at all — it is stdlib, so installing it cannot conflict with whatever torch, transformers or numpy versions your training code already pins. The heavy dependencies live in runara-cookbook.

Metadata

Release files for runara 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 runara 0.1.1
File Size Uploaded Provenance Actions
runara-0.1.1.tar.gz 26.0 kB Without provenance Details for runara-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 45.8 kB

Release files / runara-0.1.1.tar.gz

Download URL runara-0.1.1.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
687b89697d89e41685bfdc5e3a8ce06e1970eb0328a8fdc8aea7422c5143b497
BLAKE2b-256 checksum
How to use checksums
193a58595458570b2728f03bb93bb3e7e0e2a852450bacbaf2b54a65f5775517
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

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

Download URL runara-0.1.1-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c801243407db6fed52ffd61e7320b3631c69a828d160859016e54306e97e70d2
BLAKE2b-256 checksum
How to use checksums
585e3f45b297cd6a2bc276daa06e8a9faed7ce8f3bea1951a8ff1bf2c50a101b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for runara 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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