/** * export/index.ts — the model-export registry. * * One entry point — {@link exportEvermind} — turns a trained {@link EvermindLM} * (+ its tokenizer) into a named set of files in a requested format. The runtime * is untouched: export reads the model through its public surface only. This is * the *publishing* seam — training/serving stay in the WebGPU/TS runtime; export * is offered as a separate step that emits portable artifacts (ONNX, safetensors, * GGUF) and a complete Hugging Face repo bundle. * * Formats: * • "safetensors" → model.safetensors * • "onnx" → model.onnx * • "gguf" → model.gguf * • "huggingface" → a full HF repo (safetensors + onnx + gguf + config + * tokenizer.json + generation_config + README), ready to push */ import type { EvermindLM } from "../lm/evermind_lm.js"; import type { BPETokenizer } from "../tokenizer/bpe.js"; import { type HfMeta } from "./hf.js"; export type ExportFormat = "safetensors" | "onnx" | "gguf" | "huggingface"; /** One emitted file. `data` is bytes (binary) or a string (text). */ export interface ExportFile { path: string; data: Uint8Array | string; contentType: string; } export interface ExportResult { format: ExportFormat; files: ExportFile[]; /** Total trainable scalar parameters of the exported model. */ paramCount: number; } export interface ExportOptions extends HfMeta { /** Store weights as float16 where the format supports it. Default false. */ fp16?: boolean; } /** Catalog of formats for UI pickers (id + human label + extension). */ export declare const EXPORT_FORMATS: { id: ExportFormat; label: string; description: string; ext: string; }[]; /** * Export a trained model in the requested format. `tokenizer` is required for the * "huggingface" bundle (to emit tokenizer.json); the weight-only formats ignore it. */ export declare function exportEvermind(lm: EvermindLM, format: ExportFormat, opts?: ExportOptions, tokenizer?: BPETokenizer): ExportResult; export { exportSafetensors, tensorsToSafetensors } from "./safetensors.js"; export { exportOnnx } from "./onnx.js"; export { exportGguf } from "./gguf.js"; export { configJson, generationConfigJson, tokenizerJson, modelCardMarkdown } from "./hf.js"; export type { HfMeta } from "./hf.js"; export { namedTensors, evermindTensorSpec, archOf, paramCount } from "./tensors.js"; export type { NamedTensor, EvermindArch, TensorSpec } from "./tensors.js"; //# sourceMappingURL=index.d.ts.map