Guides · Models & ML
Building models
Train a model on your product’s data and serve it from the same database, with consent, features and evals governed by your access rules.
Model work on Napalm#
Model pipelines run on the same primitives as your application. Training exports and live features read directly from your product’s rows, and trainers and model servers connect as ordinary callers under your schema’s access rules.
- Rules on every read
- Training exports, change-log tails and live feature queries all pass the same schema access policies.
- Files beside rows
- Parquet shards and model checkpoints are typed records whose bytes stream directly to object storage.
- Calls to your GPU
- Gatekeeper actions hydrate permitted feature rows in one query before calling your HTTPS model server.
- Access rules
- Write a row’s read access once on the type and it holds for people and pipelines alike. Training consent is just one more rule. See Access & sign-in.
- Files
- Datasets and checkpoints are files: queryable, linkable records whose bytes stream straight to object storage.
- Actions and jobs
- Your model runs as your own HTTPS service. An action runs a query that selects the rows the caller’s access permits, then calls your model. A job runs the same call in the background with automatic retries.
- The change log
- The change log holds every committed write in order under the same access rules. Each export reads committed changes since the previous run instead of rescanning the full table.
Starting points#
Each guide covers one stage of the loop, from consent-filtered Parquet shards to shadow evaluation and zero-deploy version switches.
Consent-gated Parquet shards
Access policies on source types filter GET /changes and batch exports so opted-out workspaces never enter a DatasetShard.
CI golden sets and live shadow
Compare candidate verdicts against EvalCase rows in CI and score live traffic asynchronously in a background ext::napalm::Job.
Atomic serving slots
Store serving, previous and shadow versions in a Slot row to promote or roll back in one EdgeQL statement.
| Goal | Guide | Summary |
|---|---|---|
| Build a fine-tuning dataset | Datasets & ML training | SummaryEnforce training consent in the schema, store Parquet shards as file records and log each run’s inputs. |
| Serve your own model | Model serving | SummaryLoad features in one query, score on request or in the background and save every prediction. |
| Evaluate a new model version | Evals | SummaryScore a golden set in CI, shadow live traffic and turn misses into test cases. |
| Switch serving versions | Model registry | SummaryStore the active version in a row to promote or roll back in one write. |
| Connect assistants or agents | In-app AI copilots | SummaryCall hosted foundation models over your data under caller access rules. |
Model hosting#
Napalm stores your data and enforces access rules, while training and inference run on your own GPU infrastructure.
An action waits up to 30 seconds for a response, and a job attempt runs for up to 120 seconds. For longer runs, trigger the trainer on your GPU cluster and write the results back on completion. See Datasets and ML training.