real
SparkLang
What it is
SparkLang is a reviewable .spark language from train to patch to gate. Dry-run with fixtures; LoRA is a backend method when you have a GPU.
Example
CallsBack.ai / VoiceCore
train_sam_lora.spark (redacted). Live
2026-09-03 numbers. Histogram floors of 20 fail on a
thin freeze — that is the gate.
# VoiceCore reference — Sam store persona LoRA (redacted for public)
# Dataset: #321 mini-freeze 140 rows
# sha256: 272b64eb1d40aaf8a186df6a2f6c8e7090a1d69d03ac4928ac75a246f8e439f0
# Live trainer: SPARK_TRAIN_URL (host redacted)
# Histogram floors of 20 fail on a thin freeze — that is the gate.
model code
model train dataset "examples/fixtures/train/dataset.jsonl" base "hf://Qwen/Qwen3-27B" out "out/train/job-lora-001" backend "http" method "lora_bf16" -> job
model status "job-lora-001" -> status
expect gte status $.metrics.golden_bucket 0.8
expect eq status $.metrics.grounding_facts true
expect eq status $.metrics.rachel_bleed 0
expect histogram_min status W2a 20
expect histogram_min status W2b 20
expect histogram_min status W-SNC 20
expect histogram_min status W-TF-RECOVER 20
| expect | result | got |
|---|---|---|
| gte golden_bucket ≥ 0.8 | PASS | 0.9929 |
| eq grounding_facts true | PASS | true |
| eq rachel_bleed 0 | PASS | 0 |
| histogram_min W2a ≥ 20 | FAIL | 12 |
| histogram_min W2b ≥ 20 | FAIL | 0 |
| histogram_min W-SNC ≥ 20 | FAIL | 17 |
| histogram_min W-TF-RECOVER ≥ 20 | PASS | 111 |
class_histogram (live)
{
"W2a": 12,
"W2b": 0,
"W-SNC": 17,
"W-TF-RECOVER": 111
}adapter diff heatmap (live)
{
"layer_count": 2,
"delta_norms": {
"base_model.model.layers.0.self_attn.q_proj.lora_A.weight": 12.1372,
"base_model.model.layers.0.self_attn.q_proj.lora_B.weight": 0.0
},
"base": "hf://Qwen/Qwen3-27B",
"rank": 16,
"note": "live 2026-09-03 job-lora-sam-live-20260903; stub_weights"
}What's real today
Same table as spark --status.
| verb | reality | since |
|---|---|---|
model train | real | 0.6.0 |
model status | real | 0.6.0 |
model inspect | real | 0.8.0 |
model diff | real | 0.8.0 |
model probe | real | 0.8.0 |
model decompile | experimental | 0.8.0 |
model patch | experimental | 0.8.0 |
model eval | real | 0.8.0 |
model stage | real | 0.8.0 |
expect contains | real | 0.6.0 |
expect gte | real | 0.7.0 |
expect lte | real | 0.7.0 |
expect eq | real | 0.7.0 |
expect histogram_min | real | 0.7.0 |
expect score | real | 0.7.0 |
http get | real | 0.6.0 |
http post | real | 0.6.0 |
spark_distill_cpu | real | 0.6.0 |
spark_pref_pack | real | 0.6.0 |
spark_playbook_fit | real | 0.6.0 |
spark_faq_index | real | 0.6.0 |
lora_bf16 | real | 0.7.0 |
hf:// | real | 0.7.0 |
GitHub Action dry-run | real | 0.7.0 |
Four CPU methods + lora_bf16 + numeric
expects + hf:// + GitHub Action +
ModelScope inspect/diff/probe. decompile/patch
experimental until probe AUROC ≥ 0.85.
Install
pip install sparklangspark --dry-run examples/train_eval.sparkuses: Michael20251/sparklang/.github/actions/dry-run@maindocker compose -f tools/spark-train-ref/docker-compose.yml upmodel code
model train dataset "examples/fixtures/train/dataset.jsonl" base "fixture-base" out "out/train/job-dry-001" backend "http" method "spark_distill_cpu" -> 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"curl -sS -X POST "$SPARK_TRAIN_URL/jobs" -H 'Content-Type: application/json' -d '{"dataset":"examples/fixtures/train/dataset.jsonl","base":"fixture-base","out":"out/train/job-dry-001","backend":"http","method":"spark_distill_cpu"}'Docs · Playground · Source
Docs · Playground · Source · License
-
No hosted public trainer —
SPARK_TRAIN_URLis yours. -
model decompile/model patchstay experimental until probe AUROC ≥ 0.85. -
model stagenever setsserving_loadedtrue.