Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/shared/generated/forge/AlloyHardware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Hardware envelope for the recipe. Tells the foundry what device
* tier to target + estimates resource needs. Mirrors the existing
* Python `AlloyHardware` shape.
*/
export type AlloyHardware = {
/**
* Minimum VRAM (GB) required to run the foundry pipeline.
*/
min_vram_gb?: number,
/**
* Recommended VRAM (GB) for comfortable headroom.
*/
recommended_vram_gb?: number,
/**
* Estimated wall-clock duration for a full forge run (informational).
*/
estimated_duration_minutes?: number,
/**
* Whether the pipeline can fall back to CPU if no GPU available.
*/
supports_cpu: boolean,
/**
* Devices the recipe has been validated on (informational; the
* artifact's `hardware_verified` is the authoritative post-run
* list).
*/
tested_on: Array<string>, };
31 changes: 31 additions & 0 deletions src/shared/generated/forge/AlloySource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Source model identifier — what the foundry forges from.
*
* Mirrors the `AlloySource` shape from
* `forge-alloy/python/forge_alloy/types.py`. Phase 2 replaces the Python
* type with a `derive(TS)` import of this Rust type as the source of
* truth.
*/
export type AlloySource = {
/**
* Hugging Face model identifier (e.g., "Qwen/Qwen3.5-4B-Instruct").
*/
base_model: string,
/**
* Architecture family (e.g., "qwen3", "llama", "mistral").
*/
architecture: string,
/**
* Optional pinned revision (commit / branch / tag) for reproducibility.
*/
revision?: string,
/**
* MoE indicator. Defaults to false (dense models).
*/
is_moe: boolean,
/**
* Number of experts in the MoE (None for dense).
*/
total_experts?: number, };
25 changes: 25 additions & 0 deletions src/shared/generated/forge/BenchmarkDef.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Benchmark to run during evaluation. Mirrors the existing Python
* `BenchmarkDef` shape so Phase 2 can swap the Python type to a
* generated client of this Rust type.
*/
export type BenchmarkDef = {
/**
* Benchmark name (e.g., "humaneval", "mmlu", "hellaswag").
*/
name: string,
/**
* Optional sub-task / split name within the benchmark.
*/
subset?: string,
/**
* N-shot setting. None = benchmark default.
*/
n_shot?: number,
/**
* Whether this benchmark's result should be submitted to a
* leaderboard. Defaults to false.
*/
submit_to_leaderboard: boolean, };
36 changes: 36 additions & 0 deletions src/shared/generated/forge/CorpusRef.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Pointer to the calibration corpus used for the importance profile +
* (eventual) compensation LoRA. Held-out from `evaluation_benchmarks`.
*
* Bytes don't live in Continuum's ORM (corpora can be MB-GB). The
* recipe carries a pointer; the bytes live in HF datasets, foundry-
* node-local storage, or wherever the `source_url` resolves.
*
* `content_hash` uses the canonical `"sha256:<hex>"` format that
* matches `persona::admission` content_hash on the engram side
* (consensus position #8 from the design review). Cross-domain
* consistency: any two subsystems comparing hashes can do
* string-equality without normalization.
*/
export type CorpusRef = {
/**
* Human-readable corpus name (e.g., "wikitext-103-v1").
*/
name: string,
/**
* SHA-256 of the canonical corpus contents in `"sha256:<hex>"` form.
* Tamper-detection anchor + cross-domain equality with admission's
* content_hash convention.
*/
content_hash: string,
/**
* Size in bytes (informational; helps the foundry pre-flight storage).
*/
size_bytes: number,
/**
* Where the bytes live (HF dataset id, file:// URL, etc.). Optional
* because some corpora are foundry-node-local with no shareable URL.
*/
source_url?: string, };
139 changes: 139 additions & 0 deletions src/shared/generated/forge/ForgeArtifact.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AlloyHardware } from "./AlloyHardware";
import type { AlloySource } from "./AlloySource";
import type { BenchmarkDef } from "./BenchmarkDef";
import type { CorpusRef } from "./CorpusRef";
import type { HardwareProfile } from "./HardwareProfile";
import type { PriorBaseline } from "./PriorBaseline";
import type { QuantTier } from "./QuantTier";

/**
* Foundry-generated output. Combines (a) a snapshot of the recipe
* fields the foundry consumed + (b) execution outputs that only the
* foundry knows.
*
* Stored as a Continuum entity (Phase 3 wires the registry). Read by
* `publish_model.py` as the source of truth for what gets published.
* Never authored by hand.
*/
export type ForgeArtifact = {
/**
* Stable artifact id (different from recipe id — one recipe can
* produce many artifacts across multiple runs / hardware tiers).
*/
id: string,
/**
* Which recipe produced this artifact.
*/
recipe_id: string,
/**
* Recipe version at run time (semver). Pinned so a later recipe
* revision doesn't retroactively change what this artifact claims
* to come from.
*/
recipe_version: string,
/**
* Recipe `name` snapshot (denormalized — lets the artifact card
* render without re-fetching the recipe entity).
*/
recipe_name: string,
/**
* Paragraph for the README/card.
*/
description: string,
/**
* One-line plain-English headline.
*/
user_summary: string,
/**
* Recipe author at the time of run.
*/
author: string,
/**
* Tags from the recipe at run time.
*/
tags: Array<string>,
/**
* SPDX license identifier.
*/
license: string,
/**
* Methodology paper URL from the recipe at run time.
*/
methodology_paper_url?: string,
/**
* Limitations from the recipe at run time.
*/
limitations: Array<string>,
/**
* §4.1.3.4 negative-baselines preserved from the recipe.
*/
prior_metric_baselines: Array<PriorBaseline>,
/**
* Source model snapshot.
*/
source: AlloySource,
/**
* Calibration corpus pointer used for THIS forge.
*/
calibration_corpus: CorpusRef,
/**
* Quant tiers requested by the recipe.
*/
quant_tiers: Array<QuantTier>,
/**
* Benchmarks requested by the recipe.
*/
evaluation_benchmarks: Array<BenchmarkDef>,
/**
* Hardware target from the recipe.
*/
hardware: AlloyHardware,
/**
* When the foundry started this run (epoch milliseconds UTC).
*/
forged_at_ms: number,
/**
* Total wall-clock duration of the forge run (minutes).
*/
duration_minutes?: number,
/**
* Final parameter count after prune/compact (in billions).
*/
forged_params_b?: number,
/**
* Active params per token for MoE artifacts (in billions). None
* for dense models.
*/
active_params_b?: number,
/**
* Devices the artifact has been verified on, with measured
* throughput + memory. Drives the published card's device grid.
*/
hardware_verified: Array<HardwareProfile>,
/**
* Content-addressable hash of the populated artifact JSON. Used
* as the verification anchor by `publish_model.py` and by the
* proof-contract trust layer (see grid/FORGE-ALLOY-PROOF-CONTRACTS.md).
*/
alloy_hash?: string,
/**
* Full execution results blob. v1 carries this as opaque JSON
* matching the existing Python `AlloyResults` shape (benchmarks,
* perplexity, samples, integrity attestation). Phase 2 types this
* as a first-class Rust struct once the foundry executor needs it.
*/
results?: unknown,
/**
* Publication receipt blob. Same Phase 2 deferral as `results` —
* opaque JSON for v1, typed when the publish path is ported into
* Rust. Mirrors the existing Python `AlloyReceipt`.
*/
receipt?: unknown,
/**
* Integrity attestation blob. Carries the IntegrityAttestation
* (signed proof of the forge run) when the run was attested.
* Opaque JSON for v1; typed when the proof-contract integration
* (grid/FORGE-ALLOY-PROOF-CONTRACTS.md) lands in Rust.
*/
integrity?: unknown, };
122 changes: 122 additions & 0 deletions src/shared/generated/forge/ForgeRecipe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AlloyHardware } from "./AlloyHardware";
import type { AlloySource } from "./AlloySource";
import type { BenchmarkDef } from "./BenchmarkDef";
import type { CorpusRef } from "./CorpusRef";
import type { PriorBaseline } from "./PriorBaseline";
import type { QuantTier } from "./QuantTier";

/**
* Authored recipe — the input the foundry consumes.
*
* Stored as a Continuum entity (Phase 3 wires the entity registry).
* Edited via standard `Commands.execute('data/...')` primitives. Never
* consumed directly by `publish_model.py` — that script reads the
* `ForgeArtifact` (sibling type) the foundry emits.
*
* All prose fields the model card renders live HERE, not in a hand-
* authored `.alloy.json`.
*/
export type ForgeRecipe = {
/**
* Stable recipe identifier. Generated at recipe creation time.
*/
id: string,
/**
* Recipe name (e.g., "qwen3.5-4b-code-aggressive").
*/
name: string,
/**
* Semantic version of THIS recipe (semver). Bump when revising
* the recipe; lineage chain via `parent_recipe_id`.
*/
version: string,
/**
* Paragraph for the README/card.
*/
description: string,
/**
* One-line plain-English headline (used as the model card subtitle).
*/
user_summary: string,
/**
* Recipe author (e.g., "continuum-ai" or a user handle).
*/
author: string,
/**
* Tags for discovery (e.g., ["code", "pruning", "4b"]).
*/
tags: Array<string>,
/**
* SPDX license identifier or shorthand. Default "apache-2.0"; the
* caller is responsible for inheriting the source model's license
* when applicable (consensus position #10 — `license_strategy`
* auto-inheritance lands in v2).
*/
license: string,
/**
* Optional link to the methodology paper.
*/
methodology_paper_url?: string,
/**
* Known limitations of the recipe (rendered into the model card).
*/
limitations: Array<string>,
/**
* §4.1.3.4 negative-baselines preserved for falsifiability.
*/
prior_metric_baselines: Array<PriorBaseline>,
/**
* Base model + architecture metadata.
*/
source: AlloySource,
/**
* Ordered pipeline of recipe stages. v1 carries stages as opaque
* JSON values matching the existing `AlloyStage` discriminated
* union in `forge-alloy/python/forge_alloy/types.py`. Phase 2
* replaces this with a typed `Vec<RecipeStage>` enum where each
* variant carries an optional `notes: String` field for the
* methodology blockquote (consensus position #2 from the design
* review — per-variant notes, not index-keyed sidecar).
*/
stages: Array<unknown>,
/**
* How many times to repeat the prune→train cycle (1 = single pass).
* Most recipes are 1.
*/
cycles: number,
/**
* Held-out corpus pointer (importance profile + LoRA training).
*/
calibration_corpus: CorpusRef,
/**
* Which output formats / tiers to produce (top-level per consensus
* position #3 — quant tiers are an artifact property, not a stage
* config).
*/
quant_tiers: Array<QuantTier>,
/**
* Benchmarks to run during evaluation.
*/
evaluation_benchmarks: Array<BenchmarkDef>,
/**
* Target hardware envelope (VRAM, device list, CPU fallback).
*/
hardware: AlloyHardware,
/**
* Parent recipe id, if this recipe was forked from another. None
* for net-new recipes. v1 lineage is one-directional (recipe →
* recipe); bidirectional lineage (recipe ← artifact) is a future
* `parent_artifact_ids` field per consensus position #9.
*/
parent_recipe_id?: string,
/**
* When the recipe was authored (epoch milliseconds UTC). Same
* convention as `Engram.admitted_at_ms` from the engram thread —
* `u64` epoch ms, not chrono::DateTime.
*/
authored_at_ms: number,
/**
* When the recipe was last edited (epoch milliseconds UTC).
*/
updated_at_ms: number, };
Loading
Loading