CrucibleIR.ModelRef (CrucibleIR v0.2.1)

View Source

Reference to a registered model in the model registry.

A ModelRef identifies a specific model that can be used for training, evaluation, or deployment. It supports multiple providers and frameworks.

Fields

  • :id - Model identifier (required)
  • :name - Human-readable model name
  • :version - Semantic version string
  • :provider - Model source/provider
  • :framework - ML framework
  • :architecture - Model architecture type
  • :task - ML task type
  • :artifact_uri - Path to model artifacts
  • :metadata - Additional metadata
  • :options - Provider-specific options

Examples

iex> ref = %CrucibleIR.ModelRef{id: :gpt2_base, provider: :huggingface}
iex> ref.provider
:huggingface

Summary

Types

architecture()

@type architecture() :: :transformer | :lstm | :cnn | :mlp | atom()

framework()

@type framework() :: :nx | :pytorch | :tensorflow | :onnx | :safetensors | atom()

provider()

@type provider() :: :local | :huggingface | :openai | :anthropic | :s3 | :gcs | atom()

t()

@type t() :: %CrucibleIR.ModelRef{
  architecture: architecture() | nil,
  artifact_uri: String.t() | nil,
  framework: framework(),
  id: atom() | String.t(),
  metadata: map() | nil,
  name: String.t() | nil,
  options: map() | nil,
  provider: provider(),
  task: task() | nil,
  version: String.t() | nil
}

task()

@type task() ::
  :text_classification
  | :text_generation
  | :embedding
  | :qa
  | :summarization
  | atom()