Skip to content

feat(forge): forge/export — package a trained checkpoint into the pageable LoRA layer - #1696

Merged
joelteply merged 1 commit into
canaryfrom
feat/forge-export-stage
Jun 20, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/forge-export-stage

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The reproduction step

Turns a forge/train checkpoint into the unit the grid exchanges — a pageable LoRA layer (--format lora), or a quantized GGUF standalone. continuum builds the invocation; unsloth packages.

What

  • Drives unsloth export <checkpoint> <out> --format ... off the main thread; quantization threaded only on the GGUF path.
  • Missing-checkpoint / missing-unsloth fail loud.
  • Arg construction is a pure build_export_args so the invocation is pinned by unit tests without a real checkpoint (export has no --dry-run).

Tests (extend the forge mod)

  • export_args_for_lora_omit_quantization · export_args_for_gguf_include_quantization · forge_export_errors_on_missing_checkpoint
  • 13/13 forge tests pass.

Remaining for #32

The grid card — content-addressed alloy_hash of the exported layer → populate the ForgeArtifact → emit to the catalog — and page-in (genome.activate_skill).

See memory lora-layers-as-p2p-exchanged-genome.

🤖 Generated with Claude Code

…eable LoRA layer (genome loop, Phase 5 slice 2)

The "reproduction" step of the genome economy: turns a forge/train checkpoint
into the unit the grid exchanges. `--format lora` exports the LoRA adapter (the
pageable genome layer); `gguf` exports a quantized standalone (quantization
threaded only for that path). continuum builds the invocation; unsloth packages.

Drives `unsloth export <checkpoint> <out> --format ...` off the main thread
(tokio::process). Missing-checkpoint and missing-unsloth fail loud. The arg
construction is a pure `build_export_args` so the invocation is pinned by unit
tests WITHOUT needing a real checkpoint (no --dry-run on export).

Tests (extend the forge mod): lora omits --quantization; gguf includes it;
missing-checkpoint guard (skip-if-no-unsloth). 13/13 forge tests pass.

Remaining for #32: the grid CARD — content-addressed alloy_hash of the exported
layer + populate the ForgeArtifact + emit to the catalog — and page-in
(genome.activate_skill). See memory lora-layers-as-p2p-exchanged-genome.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit e0d6e7e into canary Jun 20, 2026
4 checks passed
@joelteply
joelteply deleted the feat/forge-export-stage branch June 20, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant