package kaun

  1. Overview
  2. Docs

Module Kaun_huggingface.RegistrySource

Registry of known model architectures with their loading functions

Sourcetype ('params, 'a, 'dev) model_spec = {
  1. architecture : string;
    (*

    Architecture name (e.g., "GPT2", "BERT")

    *)
  2. config_file : string;
    (*

    Config filename (e.g., "config.json")

    *)
  3. weight_files : string list;
    (*

    Weight filenames to try (e.g., "model.safetensors", "pytorch_model.bin")

    *)
  4. load_config : Yojson.Safe.t -> 'params;
    (*

    Parse config JSON into model parameters

    *)
  5. build_params : dtype:(float, 'a) Rune.dtype -> 'params -> 'a Kaun.params;
    (*

    Build parameter tree from config

    *)
}
Sourceval register : string -> ('params, 'a, 'dev) model_spec -> unit

Register a model architecture

Sourceval get : string -> ('params, 'a, 'dev) model_spec option

Get a registered model spec