Typical Python SDK soup
client = OpenAI(...)
resp = client.chat.completions.create(...)
# separate train script, eval notebook,
# CI secrets, ad-hoc shell glue…
SparkLang
One reviewable language surface for compile → dump → train →
serve → share. Dry-run fixtures in CI. Owned
spark-coder stays tiny —
no "competitive AI win" claims.
Offline-first:
./spark --dry-run.
Live jobs hit
SPARK_TRAIN_URL.
Five CPU reference methods:
spark_distill_cpu,
spark_pref_pack,
spark_playbook_fit,
spark_faq_index,
spark_reply_pack.
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
expect contains job fixture "…/want_accepted.txt"
expect contains status fixture "…/want_succeeded.txt"
# ./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 via
backend "http" to your trainer at
SPARK_TRAIN_URL
(POST …/jobs,
GET …/jobs/{id}). Dry-run uses
fixtures; live needs a service that implements the
Trainer HTTP contract
— in-repo reference:
tools/spark-train-ref
ships five CPU methods:
spark_distill_cpu,
spark_pref_pack,
spark_playbook_fit,
spark_faq_index,
spark_reply_pack
(real weights.pt /
pref_pack.json+ranker /
playbooks.json+router /
faq_index.json+encoder /
replies.json+gate —
not LoRA). Captures:
live-train-capture.txt,
live-train-methods-capture.txt.
model train dataset "…" base "…" out "…" backend "http" -> job
model status "job-id" -> status
After train, assert bound job and status fields with
expect contains … fixture
(exit 0/1) — gate of this job, not unrelated gateway
aliases.
expect contains job fixture "…/want_accepted.txt"
expect contains status fixture "…/want_succeeded.txt"
Dry-run writes fixture artifact paths (no GPU). Live POSTs to the
trainer at
SPARK_TRAIN_URL
(backend "http"), or an allowlisted
local-yield unit.
# examples/train_eval.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
expect contains job fixture "examples/fixtures/train/want_accepted.txt"
expect contains status fixture "examples/fixtures/train/want_succeeded.txt"
Fail path:
examples/train_eval_fail.spark
(exit 1). Live HTTP proof (five CPU methods, via)
./spark --live /
./spark-train-http --method):
live-train-methods-capture.txt.
Model training docs ·
Build a Model ·
What's shipping today.
Beyond the train → status → expect wedge: local
spark-analyze,
grounded asks with
./spark-ground,
voice ask / voice easy, the three-pane IDE
(spark-bc-gui),
weight gallery, and decompile scoreboard. Details live in
the
factory hub,
language reference, and
what's shipping today.
./spark-ground —
verify-before-speak; wrong fixture → abstain.
Browse · dump · ask · weights play · helpers — local panes.
IDE docs →Measured scoreboard (wins / ties / losses / N/A) — no fake “beats all.”
Scoreboard →Catalog stub weights; inspect, diff, play forward on CPU (or a consumer GPU).
Gallery →Follow the trail: install → first dry-run → train→status→expect → gate a job. Field concepts live in the AI knowledge hive.
Transformers, training, inference, agents, evaluation — engineer explainers with diagrams. No competitive win claims.
Open the hive →
Install the runtime and verify with
./spark --dry-run.
A minimal train → status → expect loop you can dry-run in CI.
Write train_eval.spark →Orchestrate jobs, expect gates, classify, extract — the train→status→expect primitives.
Quick tour →Submit a dry-run train job, poll status, then expect pass/fail.
Open wizard →Engineer map: compile, decompile, opcodes, TRAIN/STEP, train loop, architecture, tokenizer, serve, eval, make, CI/Pages, plus diagrams and model aspects (ears / eyes / speaking / behaviors) and owned spark-coder.
Open factory map →
Spark compiles Spark to SPARK_BC (TRAIN
/ STEP /
TRAIN_STATUS), dumps hex, emits
Spark-created init weights. Dry ≠ trained. GAS
--compile wraps bootstrap.
# Dry-run train → status → expect — no network, no API key
./spark --dry-run examples/train_eval.spark
# Optional live submit — your trainer at SPARK_TRAIN_URL
export SPARK_TRAIN_URL=http://127.0.0.1:8090/v1
./spark --live examples/model_train.spark
See programming guide and language reference.