Affine batches: from inputs to a verified result

Validate a frozen batch, approve one qualified GRPO step, and verify the signed parent/candidate comparison with the CLI, MCP or API.

What goes in and what comes back

The input is a frozen batch of prompts, rollouts and rewards, together with the mining snapshot, model head, reference, tokenizer and evaluator settings. The qualified runtime validates the official tokenizer inputs, performs one GRPO optimizer step, and compares the parent and candidate. Delivery includes a signed receipt and a comparison archive.

The small request uploaded through this interface refers to an already approved frozen job. It does not upload arbitrary batch or model bytes, rent a GPU, open an operator window or authorize another allocation. Ask the operator to qualify a new owner-bound profile when capacity is unavailable. An earlier completed run is evidence for that run only.

StageUseful result
Review batch and mining snapshotExact byte hashes and structural checks; full tokenizer validation remains separate.
Prepare against an approved profilePinned metadata request and saved configuration; no compute starts.
Approve one launchOwned task identity; queued and allocated remain distinct.
Verify deliverySignature, retained bindings, archive SHA-256 and size; scientific RED remains a valid result.

Connect the owner and check capacity

Use the normal browser sign-in and invitation flow for the intended owner. Configure a training:read key for reads, training:write for upload and explicit launch, and a separate resources:write key to save the configuration. Supply RELIQUARY_TRAINING_KEY and RELIQUARY_RESOURCES_KEY through your existing local secret mechanism. Keys must belong to the same owner; keep them out of prompts and files.

Read affineBatch.ready, profiles and reason in the authenticated status response. The ordinary training flag is separate. Retain the exact approved profile, profile digest and environment digest independently before launch; its public key is the receipt trust anchor. A configured key or installed skill does not qualify a runtime.

Check the installed client and owned batch availability

reliqua --version
reliqua doctor --json
reliqua affine status --json

CLI setup — Verified archive, Node.js 22+ and local configuration.

MCP setup — Existing scoped connection with writes disabled by default.

Official batch skill — Versioned workflow instructions for this release.

Prepare, upload the request and save the draft

Store JSON inputs and outputs privately outside a repository. Each --input file must be a regular UTF-8 JSON file of at most 32 KiB. prepare.private.json contains profileDigest, maxHours and maxCostMicroUsd from the reviewed profile. Cost uses millionths of USD. Duration and cost cannot exceed the approved job.

For upload.private.json, copy the exact request returned by prepare into request and add filename: batch-request.jsonl. Pass --confirm-rights only after confirming data rights for this request. The uploaded bytes are JSON.stringify(request) followed by one newline; retain their SHA-256 as requestSha256 before launch. Save the returned file.id.

draft.private.json contains prepared (the entire prepare response), name and a stable UUID requestKey. Keep that key and exact input before sending. Save the returned resource.id and resource.revision. The saved configuration fixes the approved request and one optimizer step.

Run each selected stage once

umask 077
reliqua affine prepare --input prepare.private.json --json > prepared.private.json
reliqua affine upload --input upload.private.json --confirm-rights --json > uploaded.private.json
reliqua affine save-draft --input draft.private.json --json > draft-result.private.json

Review the exact submission and approve launch

start.private.json contains submission with draftId, revision and datasetId from the saved responses, plus a separate stable UUID requestKey for this launch. Include quoteId only when required by the server. The supported batch profile is an operator-funded pilot; where a quote is required, call reliqua affine quote with the same draft, revision and dataset, then review its rate, ceiling and expiry.

Pass --approve-execution only after approval for this exact submission and cost ceiling. No command automatically retries, polls or provisions capacity. If a response is lost or reports outcome_unknown, retain the original input and key, reconcile the owned draft/task history, and reuse the same key for the same action. Never create a replacement key to work around uncertainty.

Separately approve and follow the task

reliqua affine start --input start.private.json --approve-execution --json > started.private.json
reliqua affine task --id RETURNED_TASK_ID --json

Download and verify the delivered comparison

delivery.private.json contains taskId, the original uploaded request, and pins with the independently retained profileDigest, environmentDigest, requestSha256 and affineBatch (the entire approved profile). Do not reconstruct trust pins from the result being checked.

Verification checks the succeeded owned task, Ed25519 signature, source/model/job/context bindings, archive size and streamed SHA-256. Download requires a new directory and writes private receipt.json, result.zip and verification.json. A failed download cleans only its new directory and never overwrites an existing one.

Integrity is separate from scientific acceptance. RED, negative gain and nullable estimator metrics can be valid delivered results. The client does not rerun the estimator or attest live inference identity. liveParity, officialAcceptance, nativeRewardVerified and chainSubmission remain false. Keep the original request, approved profile, receipt, archive and verification record together.

Verify without saving, or retain the complete delivery

reliqua affine verify-delivery --input delivery.private.json --json
reliqua affine download --input delivery.private.json --directory ./verified-delivery --json

Use the same workflow from an agent

With MCP, reliquary_affine_batch_review and reliquary_affine_batch_plan inspect inline batchJson and miningJson locally, each at most 1 MiB, without keys, network calls or execution. The SDK accepts complete batches up to 64 MiB. A structural review is separate from full official tokenizer validation.

For the qualified hosted job use reliquary_affine_batch_prepare, reliquary_training_upload with format affine_batch_request, reliquary_resource_create, and the existing quote, explicitly approved training_start, task and artifact tools. Keep MCP writes disabled during setup. Installation never supplies launch approval. The SDK createAffineBatchClient uses the same bounded routes and stage contracts; examples/affine-cli.md in the client archive contains the complete CLI input shapes.

Training API — Owner scopes, task reads and artifact retrieval.

Saved resources API — Separate draft credentials and immutable revisions.

Checkpoint diagnostic — A separate four-case evaluation of a prepared public checkpoint.

What you get

An input-bound local report/plan, or one explicitly approved qualified batch workflow and integrity-verified delivery, with scientific outcome and official-acceptance limits preserved.

Hosted preparation requires an available qualified owner profile; local review cannot establish tokenizer validity, gain or official parity.

SupportRequirement
InterfacesCLI, MCP, HTTP
Accessapproval required
Workflow statequalified pilot
Credential corridors (see workflow)training, resources

Ask your assistant

Example task

Prepare batch generation and export, official tokenizer validation, one GRPO step and parent/candidate comparison.

Install this skill

Use an existing compatible MCP connection or the customer CLI. Skills provide instructions; installing them does not configure credentials, grant permissions or enable execution.

Install reliquary-affine-batches

reliqua skills install --skill reliquary-affine-batches --directory "$HOME/.agents/skills"

Download SKILL.md — Official task instructions, version 0.9.0.

Install the customer CLI — Verified release downloads, commands and troubleshooting.

Connect MCP — Keep writes disabled for discovery and planning.

Authentication and exact scopes — Corridor names identify key configuration; the API checks its actual read and write scopes.

Follow the workflow

  • CLI users start with reliqua affine status --json and their own RELIQUARY_TRAINING_KEY. Read the installed Affine CLI guide before a mutation. prepare, upload, save-draft, quote and start each consume one explicit --input JSON file of at most 32 KiB. Upload requires --confirm-rights; start requires --approve-execution in addition to the retained submission and its original stable requestKey. These flags acknowledge authorization for the exact selected stage; they do not qualify a profile or override upstream refusal.
  • For an existing signed delivery, retain taskId, the original request and independent profile/environment/request digests plus approved affineBatch profile. Run reliqua affine verify-delivery --input verification-input.private.json --json, or affine download with --directory pointing to a new private directory. Download writes receipt.json, result.zip and verification.json only after signature/binding/hash checks; it never overwrites an existing directory. On interrupted download, reuse the same task and a new output directory rather than launching again. No command automatically polls, retries or provisions capacity.
  • Use the bundled instructions and pinned official miner kit. Local batch review and plan run without a training credential, network, upload, shell execution or write enablement. Hosted preparation is a separate authenticated, qualification-gated corridor and does not imply general service availability.
  • The mechanism is batch generation/export, full official-tokenizer validation, one GRPO step from the parent, then parent/candidate comparison. It is separate from the 0.7 checkpoint diagnostic and generic training drafts.
  • Provide explicit v1/v2 wire JSON and raw mining.json text. SDK review/export accepts at most 64 MiB of complete UTF-8 JSON; MCP accepts at most 1 MiB inline batch text. Local review/plan accept no arbitrary local paths, hotkey seeds, credentials or presigned URLs.
  • Raw bytes are hashed without reserialization. All group structures and finite rewards are checked, then whole prompts are dropped in file order when either supplied live cap would be exceeded. Any number of rollouts >=1 is supported; eight is not mandatory. The retained part rejects literal chat control markers. v2 lr and kl use inclusive supplied bounds and defaults, with no clamping. Snapshots with train bounds or defaults unsupported by the fixed kit revision are refused.
  • Structural review always reports structuralOnly:true and tokenValidation:not_run. Run the pinned official checker with the actual head tokenizer; output cap and prompt-plus-output limits require that tokenizer, not a character estimate.
  • The portable plan binds raw batch/mining digests, source revision, independently selected head/reference descriptor digests, explicit seed, frozen comparison clock and prior availability. Descriptor provenance remains caller-provided-unverified. Resolve placeholders only on the explicitly selected owned execution host; check pins and host identity before running a stage.
  • The example train command is CPU plumbing with a 512-token budget. It does not demonstrate learning gain. Missing fp32 master, private prior/selection and production kernels prevent official parity. Known upstream manifest mismatches and the removed cap_envs gate argument require the reviewed wrapper adaptations; do not claim a stock-kit pass.
  • For an already approved owner profile, call affine_batch_prepare with exact profileDigest, maxHours and maxCostMicroUsd. It does not execute compute. Retain returned request, configuration, mode and absolute jobExpiresAt. Confirm upload rights, then training_upload with format affine_batch_request sends only one small JSONL metadata request, never raw rollout/model bytes. Save the exact one-step affine_batch configuration using resource_create with a separate resources:write key and stable idempotencyKey. After a separate explicit execution approval, training_start requires approveExecution:true and its own stable key. Stop on unavailable or expired profiles; preserve original keys and reconcile outcome_unknown without automatic retries.
  • Read the owned task and download only its returned artifacts in bounded ranges. Verify archive size/hash and the Ed25519 batch receipt against independently retained profile/request/source/model pins; nullable metrics and RED scientific decisions are valid. Signed integrity does not establish learning gain, live parity, official acceptance, reward verification or chain submission.
  • Keep raw batches, plans, endpoint details and evidence private outside repositories. Local plan qualification remains not_run; liveParity, officialAcceptance and chainSubmission remain false. No chain registration, batch submission, GPU spend or unattended execution is authorized by planning.

Tools and API routes

Call reliquary_connection first and use only tools registered in that connection. Route templates need the owned resource identifiers described by the existing API reference.

CLI command

reliqua affine status --json
InterfaceOperation
MCPreliquary_connection
MCPreliquary_affine_batch_review
MCPreliquary_affine_batch_plan
MCPreliquary_affine_batch_prepare
MCPreliquary_training_upload
MCPreliquary_resource_create
MCPreliquary_training_start
MCPreliquary_training_task_get
MCPreliquary_training_artifact_download
HTTPPOST /api/v1/training/affine-batch/prepare
HTTPPOST /api/v1/training/files
HTTPPOST /api/resources
HTTPPOST /api/v1/training/tasks
HTTPGET /api/v1/training/tasks/{id}
HTTPGET /api/v1/training/tasks/{id}/artifacts/{artifactId}

Availability and authorization

This workflow can prepare an action using existing contracts. Execution requires current server capabilities, qualified capacity, appropriate account scope, a fresh quote when applicable, and explicit approval of the concrete action. Only the documented staged Affine batch CLI supports an explicit launch. MCP writes stay disabled by default.

Back to the skills catalog — Find another workflow or connect an interface.