Typical Python SDK soup
client = OpenAI(...)
resp = client.chat.completions.create(...)
# separate train script, eval notebook,
# CI secrets, ad-hoc shell glue…
SparkLang — the Spark programming language
A language beats another Python SDK because one reviewable
.spark file covers train → eval → ship,
with dry-run fixtures you can run in CI without API keys.
Offline-first by default:
./spark --dry-run.
Real model train /
model build jobs when you go live.
Library glue scatters prompts, training scripts, and eval harnesses
across repos. A .spark program is one
reviewable surface — same file for dry-run CI and live ops.
client = OpenAI(...)
resp = client.chat.completions.create(...)
# separate train script, eval notebook,
# CI secrets, ad-hoc shell glue…
model train dataset "data.jsonl" base "base" out "out/job-1" backend "http" -> job
model status "job-1" -> status
ask "Score this adapter on the suite" -> report
print report
# ./spark --dry-run train_eval.spark
./spark --dry-run uses offline
fixtures — no keys, no network. Pass
--live only when you want real
calls.
./spark --dry-run examples/model_train.spark
model train /
model build submit adapters /
checkpoints. Not a markdown plan sold as training.
model train dataset "…" base "…" out "…" backend "http" -> job
model status "job-id" -> status
Bind model output, print it, chain classify / extract / pipeline after train — one program for the loop.
ask "Explain gravity in one sentence" -> text
print text
Dry-run writes fixture artifact paths (no GPU). Live uses a pluggable
backend (http or allowlisted
local-yield).
# model_train.spark — dry-run first
model train dataset "examples/fixtures/train/dataset.jsonl" base "fixture-base" out "out/train/job-dry-001" backend "http" -> job
model status "job-dry-001" -> status
Analyze / compare / improve are eval helpers.
model plan writes an optional markdown
plan only — not training.
Model training docs ·
Build a Model.
Secondary language surfaces — useful, not the homepage thesis.
ide ask, playbooks, LSP-friendly
editing.
spark-rag-http when configured.
listen /
speak; PSTN off by default
(dial "+15555550100" placeholder
only.
Language reference.
http get /
http post are
[roadmap].
Network + web.
Follow the tutorial path — install, first program, AI primitives, then train.
Install the runtime, run your first dry-run, and set up live ask.
Start here →
Hello world with use,
ask, and
print.
Train, classify, extract, pipeline — AI as language statements.
Quick tour →
Submit a dry-run train job, poll status, or start from eval
helpers and an optional model plan.
# Dry-run — no network, no API key
./spark --dry-run examples/hello.spark
# Optional live ask — any OpenAI-compatible gateway
export AI_GATEWAY_URL=http://127.0.0.1:4000
./spark --live examples/ask_live.spark
See programming guide and language reference.