package kaun

  1. Overview
  2. Docs
Flax-inspired neural network library for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

raven-1.0.0.alpha2.tbz
sha256=93abc49d075a1754442ccf495645bc4fdc83e4c66391ec8aca8fa15d2b4f44d2
sha512=5eb958c51f30ae46abded4c96f48d1825f79c7ce03f975f9a6237cdfed0d62c0b4a0774296694def391573d849d1f869919c49008acffca95946b818ad325f6f

doc/kaun.huggingface/Kaun_huggingface/Registry/index.html

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 -> 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