Architecture

One gateway, five modules

By default every step below is the same FastAPI process on port 8080. The browser workbench and ftaas.Client both call it.

  1. Preview / register

    services/registry · POST /v1/datasets/preview, POST /v1/datasets/register. A gs:// path is only a label until the file is on disk under the local mirror.

  2. Create job

    services/control · POST /v1/jobs/finetune. Catalog, logs, cancel, and the model list live here too.

  3. Orchestrate

    services/workflow plus runner/local. Airflow is optional and off in settings.

  4. Train

    training/frameworks — real torch updates. Or send the job to trainer_worker on port 8090 with FTAAS_TRAIN_MODE=remote.

  5. Deploy & prompt

    services/deploy · local HF / PEFT generate. vLLM and Ray Serve are listed and not wired up.

Same calls from Python

Install with pip install ftaas once 0.2.0 is on PyPI, or from this repo.

from ftaas import Client, Framework, Technique, HyperParameters

with Client() as c:
    ds = c.register_dataset("examples/data/alpaca_sample.jsonl", name="alpaca")
    job = c.create_finetune_job(
        model_name="distilgpt2",
        dataset=ds,
        framework=Framework.TRANSFORMERS,
        technique=Technique.LORA,
        parameters=HyperParameters(max_steps=12, max_seq_length=64),
    )
    job = c.wait_for_job(job.job_id)
    ep = c.create_endpoint(job.registered_model_name, inference_framework="transformers")
    print(c.prompt(ep.endpoint_id, "What is LoRA?").completion)