Skip to content

Compile-to-weights ③: full-parameter offline compile job + registry provenance handoff #168

Description

@se-jo-ma

Pipeline block ③ (Compile: dataset → weights). Part of the compile-to-weights epic. Decision: full-parameter offline fine-tune (paper-faithful); stargraph does NOT own the GPU training loop — it owns the handoff.

Context. There is zero training infrastructure in stargraph today (ml/ is inference-only: registry + sklearn/xgboost/onnx loaders). The paper full-parameter fine-tunes a small model (e.g. Qwen3-8B) on the block-② dataset. Training is non-deterministic and heavyweight (torch, A100-class GPU) — it must live outside the deterministic runtime as an offline CI/CD "recompile" step.

Proposal. Define the compile job contract + registry handoff, not an in-process trainer.

  • A documented external trainer (full-parameter fine-tune) consumes the block-② JSONL and produces a model directory / HF snapshot.
  • A thin stargraph side records the result into ModelRegistry.register (ml/registry.py:181) with provenance metadata: source graph_hash, dataset hash, base model id, run/sample count, training config hash. Stage via alias (registry.py:230) — staging first, never auto-production.
  • If ever represented as a node, the training node is ReplayPolicy.must_stub (non-deterministic; never replayed).

Where.

  • src/stargraph/ml/registry.py register:181 / alias:230 / ModelEntry.metadata:86 (currently unused — becomes the compile-provenance carrier).
  • Pairs with block ④ (LLM-weights runtime) for the registered artifact to be loadable.

Acceptance criteria.

  • Documented full-parameter offline compile job contract (inputs: dataset+base model; output: weights dir + manifest).
  • Registered checkpoint carries source graph_hash + dataset hash + training-config hash in metadata.
  • Lands in staging alias only; promotion to production gated by the eval harness (linked).

Blockers (blocked). Depends on block ② (dataset) and block ④ (registry runtime). torch/vLLM are optional extras, never core deps.


Source: arXiv:2605.22502v1 — "Compiling Agentic Workflows into LLM Weights" (subterranean agents). Part of the end-to-end compile-to-weights pipeline epic; file refs verified against current main. Determinism: per-graph knob (fully-compiled | hybrid | rules-only) defaults to honor #117 (no learned core router).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority: roadmap gap or DX/toolingarea/runtimeGraphRun, dispatch, lifecycle, mirrorblockedBlocked on external dependency or decisionenhancementNew feature or requestneeds-designDesign not yet settled — please don't open a PR yetsize/XLEpic / multi-week / spans subsystems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions