package kaun

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

raven-1.0.0.alpha1.tbz
sha256=8e277ed56615d388bc69c4333e43d1acd112b5f2d5d352e2453aef223ff59867
sha512=369eda6df6b84b08f92c8957954d107058fb8d3d8374082e074b56f3a139351b3ae6e3a99f2d4a4a2930dd950fd609593467e502368a13ad6217b571382da28c

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