Skip to content

ForgeAlloy: portable pipeline entity — pip/crate/npm packages for the forge format #659

Open

Description

@joelteply

airc-queue card

Coordinates work via the AIRC queue substrate (airc#562). Edit this card by commenting OR by running airc queue claim/airc queue release/airc queue heartbeat (later PRs).

{
  "kind": "airc-queue-card-v1",
  "id": "#659",
  "owner": "claude-tab-2",
  "status": "claimed",
  "evidence": "Adopted existing GitHub issue into airc queue.",
  "next_action": "Triage, claim, or close this adopted backlog card."
}

Close this issue when the work is done (status=merged/abandoned).

Original issue body

Pre-adoption body

Summary

Design and implement ForgeAlloy — a portable, typed pipeline definition entity that describes everything needed to forge a model. The alloy format becomes a micro-package standard across Python, Rust, and TypeScript.

Why "Alloy"

  • "Recipe" is taken (room/activity definitions in Continuum)
  • An alloy IS its ingredients — naturally describes composition
  • Fits the forge metaphor: you don't forge without knowing your alloy
  • Short, unique, memorable

Entity Shape

ForgeAlloy (ORM entity, JSON-serializable)
├── meta: { name, author, description, version, tags, license }
├── source: { baseModel, architecture, sourceAlloyId? (re-forge lineage) }
├── stages[]: ordered pipeline steps, each a typed submodule
│   ├── PruneStage: { strategy, level, minHeads, entropyThreshold }
│   ├── TrainStage: { domain, steps, lr, batchSize, scheduler, warmup, dataset }
│   ├── LoRAStage: { rank, alpha, dropout, targetModules, quantize, quantizeBits }
│   ├── CompactStage: { deadThreshold, dormantThreshold, targetSizeGb }
│   ├── QuantStage: { format, quantType, deviceTarget }
│   ├── EvalStage: { benchmarks[], leaderboards[], passingThreshold }
│   └── PublishStage: { org, tags, cardTemplate, hfRepo }
├── cycles: number (repeat prune→train N times)
├── hardware: { minVram, recommendedGpu, estimatedDuration }
└── outputs: { formats[], artifacts[] }

Packages (micro — just schema + validation + serde)

Package Language Purpose
continuum-alloy Rust crate Source of truth. #[derive(TS)] for TypeScript, protobuf for Python
continuum-alloy pip (PyPI) Python forge scripts consume/produce alloys
@continuum-ai/alloy npm Factory widget, commands, TypeScript consumers

Key Design Principles

  • JSON always — no YAML, no TOML. JSON stored in ORM via entities
  • Portable — publish an alloy JSON, anyone imports and runs it
  • Typed stages — each stage is its own interface with validation ranges
  • Composable — stages are ordered, optional, can be mixed and matched
  • Lineage — sourceAlloyId tracks re-forge chains (the moat)
  • Self-documenting — the JSON contains everything needed to reproduce
  • Community-shareable — publish to HF alongside model, import others' alloys

Commands

  • forge/alloy/create — create from params or JSON file
  • forge/alloy/list — list stored alloys
  • forge/alloy/import — import from JSON file or HF model card
  • forge/alloy/export — export to JSON
  • forge/alloy/run — execute the pipeline on a grid node
  • forge/alloy/validate — check an alloy JSON is valid without running

Distribution

The alloy JSON ships alongside every model we publish:

  • HuggingFace model card references the alloy
  • alloy.json in the model repo
  • Anyone can fork the alloy, tweak params, re-forge

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    airc-queueenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions