Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
backends
|
|
|
default
Package _default includes the default backends, namely XLA, MPS and MLX (on Darwin), and SimpleGo.
|
Package _default includes the default backends, namely XLA, MPS and MLX (on Darwin), and SimpleGo. |
|
cmd
|
|
|
convert_v0.28
command
convert_v0.28 faciliates the conversion of pre-v0.28 GoMLX code to the updated APIs in v0.28.0 release.
|
convert_v0.28 faciliates the conversion of pre-v0.28 GoMLX code to the updated APIs in v0.28.0 release. |
|
gomlx_checkpoints
command
gomlx_checkpoints reports back on model size (and memory) usage (--summary), individual variables shapes and sizes (--vars), hyperparameters used with the model (--params) or metrics collected during model training (--metrics, --metrics_labels).
|
gomlx_checkpoints reports back on model size (and memory) usage (--summary), individual variables shapes and sizes (--vars), hyperparameters used with the model (--params) or metrics collected during model training (--metrics, --metrics_labels). |
|
core
|
|
|
graph
Package graph is the core package for GoMLX.
|
Package graph is the core package for GoMLX. |
|
graph/graphtest
Package graphtest holds test utilities for packages that depend on the graph package.
|
Package graphtest holds test utilities for packages that depend on the graph package. |
|
graph/nanlogger
Package nanlogger collects `graph.Node` objects to monitor for `NaN` ("not-a-number") or `Inf` (infinity) values.
|
Package nanlogger collects `graph.Node` objects to monitor for `NaN` ("not-a-number") or `Inf` (infinity) values. |
|
tensors
Package tensors implement a `Tensor`, a representation of a multidimensional array.
|
Package tensors implement a `Tensor`, a representation of a multidimensional array. |
|
tensors/bucketing
Package bucketing provides strategies for bucketing tensor dimensions to reduce the number of unique compiled graphs when input sizes vary.
|
Package bucketing provides strategies for bucketing tensor dimensions to reduce the number of unique compiled graphs when input sizes vary. |
|
tensors/dtensor
Package distributed defines a dtensor.Tensor, a logical tensor distributed across multiple devices organized as a distributed.DeviceMesh.
|
Package distributed defines a dtensor.Tensor, a logical tensor distributed across multiple devices organized as a distributed.DeviceMesh. |
|
tensors/images
Package images provides several functions to transform images back and forth from tensors.
|
Package images provides several functions to transform images back and forth from tensors. |
|
tensors/numpy
Package numpy allows one to read/write tensors to Python's NumPy npy and npz file formats.
|
Package numpy allows one to read/write tensors to Python's NumPy npy and npz file formats. |
|
examples
module
|
|
|
gpt2
module
|
|
|
mxbai-rerank
module
|
|
|
internal
|
|
|
cmd/constraints_generator
command
constraint_generator prints out various lists of constraints used by generics, which can then be copy&pasted into the code.
|
constraint_generator prints out various lists of constraints used by generics, which can then be copy&pasted into the code. |
|
cmd/copyright_header
command
|
|
|
cmd/graph_generator
command
|
|
|
cmd/sync_notebooks
command
|
|
|
cmd/trainer_aliases
command
trainer_aliases prints out and writes the ModelFnCompatible constraints and createModelFnWrapper function.
|
trainer_aliases prints out and writes the ModelFnCompatible constraints and createModelFnWrapper function. |
|
must
Package must provide a set of functions that check for errors and panic on error.
|
Package must provide a set of functions that check for errors and panic on error. |
|
scoped
Package scoped provides a mapping from a string to any data type that is "scoped".
|
Package scoped provides a mapping from a string to any data type that is "scoped". |
|
xlabuilderparser
Package xlabuilderparser parses the xlabuilder API to enumerate graph building functions, and the `op_types.txt` file to get a list of the supported ops.
|
Package xlabuilderparser parses the xlabuilder API to enumerate graph building functions, and the `op_types.txt` file to get a list of the supported ops. |
|
ml
|
|
|
dataset
Package datasets is a collection of utility datasets (train.Dataset) that can be combined for efficient preprocessing: `Take`, `InMemory`, `Parallel`, `Map`, `MapOnHost`, `Freeing`.
|
Package datasets is a collection of utility datasets (train.Dataset) that can be combined for efficient preprocessing: `Take`, `InMemory`, `Parallel`, `Map`, `MapOnHost`, `Freeing`. |
|
ggml
Package ggml provides graph-level decomposed dequantization for GGML block formats.
|
Package ggml provides graph-level decomposed dequantization for GGML block formats. |
|
layers
Package layers holds a collection of common modeling layers.
|
Package layers holds a collection of common modeling layers. |
|
layers/activation
Package activations implements several common activations, and includes a generic Apply method to apply an activation by its type.
|
Package activations implements several common activations, and includes a generic Apply method to apply an activation by its type. |
|
layers/attention
Package attention implements multi-head attention and related utilities.
|
Package attention implements multi-head attention and related utilities. |
|
layers/attention/kvcache
Package kvcache implements a flexible key-value (KV) cache for transformer models.
|
Package kvcache implements a flexible key-value (KV) cache for transformer models. |
|
layers/attention/pos
Package pos provides positional encoding implementations for attention mechanisms.
|
Package pos provides positional encoding implementations for attention mechanisms. |
|
layers/bspline
Package bsplines provide a GoMLX version of github.com/gomlx/bsplines: it provides evaluation of bsplines curves, that can be used as layers.
|
Package bsplines provide a GoMLX version of github.com/gomlx/bsplines: it provides evaluation of bsplines curves, that can be used as layers. |
|
layers/fnn
Package fnn implements a generic FNN (Feedforward Neural Network) with various configurations.
|
Package fnn implements a generic FNN (Feedforward Neural Network) with various configurations. |
|
layers/kan
Package kan implements a generic KolmogorovβArnold Networks, as described in https://arxiv.org/pdf/2404.19756
|
Package kan implements a generic KolmogorovβArnold Networks, as described in https://arxiv.org/pdf/2404.19756 |
|
layers/lstm
Package lstm provides a minimal "Long Short-Term Memory RNN" (LSTM) [1] implementation.
|
Package lstm provides a minimal "Long Short-Term Memory RNN" (LSTM) [1] implementation. |
|
layers/norm
Package norm implements normalization layers for GoMLX, including Batch, Layer, and RMS normalization.
|
Package norm implements normalization layers for GoMLX, including Batch, Layer, and RMS normalization. |
|
layers/peft
Package peft implements parameter-efficient fine-tuning layers for GoMLX.
|
Package peft implements parameter-efficient fine-tuning layers for GoMLX. |
|
layers/rational
Package rational implements "learnable rational functions".
|
Package rational implements "learnable rational functions". |
|
layers/regularizer
Package regularizers adds tools to facilitate add regularization to the weights learned.
|
Package regularizers adds tools to facilitate add regularization to the weights learned. |
|
layers/vnn
Package vnn implements the Vector Neuron Networks operators described in https://arxiv.org/abs/2104.12229
|
Package vnn implements the Vector Neuron Networks operators described in https://arxiv.org/abs/2104.12229 |
|
model
Package model implements a model's Store object (to store variables and hyperparameters), Scope's (scope, like a directory "path") within a store, and Exec, an executor that takes as an extra parameter a Store and will handle passing the variables automatically as extra inputs and outputs to the graph being built.
|
Package model implements a model's Store object (to store variables and hyperparameters), Scope's (scope, like a directory "path") within a store, and Exec, an executor that takes as an extra parameter a Store and will handle passing the variables automatically as extra inputs and outputs to the graph being built. |
|
model/checkpoint
Package checkpoint implements checkpoint management: saving and loading of checkpoints to file, or loading a checkpoint from an embedded checkpointHandler.
|
Package checkpoint implements checkpoint management: saving and loading of checkpoints to file, or loading a checkpoint from an embedded checkpointHandler. |
|
model/initializer
Package initializer include several weight initializers, that can be used to initialize varariables, or used in model.Scope objects as default initializer for new variables.
|
Package initializer include several weight initializers, that can be used to initialize varariables, or used in model.Scope objects as default initializer for new variables. |
|
model/modeltest
Package modeltest holds test utilities for packages that depend on model package.
|
Package modeltest holds test utilities for packages that depend on model package. |
|
nn
Package nn provides low-level implementations of common neural network operations.
|
Package nn provides low-level implementations of common neural network operations. |
|
train
Package train holds tools to help run a training loop.
|
Package train holds tools to help run a training loop. |
|
train/loss
Package losses have several standard losses that implement train.LossFn interface.
|
Package losses have several standard losses that implement train.LossFn interface. |
|
train/metric
Package metrics holds a library of metrics and defines
|
Package metrics holds a library of metrics and defines |
|
train/optimizer
Package optimizer implements a collection of ML optimizers that can be used by train.Trainer, or by themselves.
|
Package optimizer implements a collection of ML optimizers that can be used by train.Trainer, or by themselves. |
|
train/optimizer/cosineschedule
Package cosineschedule implements a cosine annealing schedule for the learning rate.
|
Package cosineschedule implements a cosine annealing schedule for the learning rate. |
|
zoo/transformer/generate
Package generate implements a generator for transformer models, including the sampling strategies: greedy, top-k, top-p and beam search.
|
Package generate implements a generator for transformer models, including the sampling strategies: greedy, top-k, top-p and beam search. |
|
zoo/transformer/generate/sample
Package sample provides various sampling strategies for autoregressive generation.
|
Package sample provides various sampling strategies for autoregressive generation. |
|
support
|
|
|
exceptions
Package exceptions provide helper functions to leverage Go's `panic`, `recover` and `defer` as an "exceptions" system.
|
Package exceptions provide helper functions to leverage Go's `panic`, `recover` and `defer` as an "exceptions" system. |
|
fsutil
Package fsutil contains utilities for working with the file system.
|
Package fsutil contains utilities for working with the file system. |
|
sets
Package sets implements a set type as a `map[T]struct{}` but with better ergonomics.
|
Package sets implements a set type as a `map[T]struct{}` but with better ergonomics. |
|
testutil
Package testutil provides utility functions for testing.
|
Package testutil provides utility functions for testing. |
|
xslices
Package xslices provide missing functionality to the slices package.
|
Package xslices provide missing functionality to the slices package. |
|
xsync
Package xsync implements some extra synchronization tools.
|
Package xsync implements some extra synchronization tools. |
|
ui
|
|
|
bashkernel
Package bashkernel implements tools to output rich content to a Jupyter notebook running the bash_kernel (https://github.com/takluyver/bash_kernel).
|
Package bashkernel implements tools to output rich content to a Jupyter notebook running the bash_kernel (https://github.com/takluyver/bash_kernel). |
|
commandline
Package commandline contains convenience UI training tools for the command line.
|
Package commandline contains convenience UI training tools for the command line. |
|
gonb/margaid
Package margaid implements automatic plotting of all metrics registered in a trainer, using the Margaid library (https://github.com/erkkah/margaid/) to draw SVG, and GoNB (https://github.com/janpfeifer/gonb/) to display it in a Jupyter Notebook.
|
Package margaid implements automatic plotting of all metrics registered in a trainer, using the Margaid library (https://github.com/erkkah/margaid/) to draw SVG, and GoNB (https://github.com/janpfeifer/gonb/) to display it in a Jupyter Notebook. |
|
gonb/plotly
Package plotly uses GoNB plotly support (`github.com/janpfeifer/gonb/gonbui/plotly`) to plot both on dynamic plots while training or to quickly plot the results of a previously saved plot results in a checkpoint directory.
|
Package plotly uses GoNB plotly support (`github.com/janpfeifer/gonb/gonbui/plotly`) to plot both on dynamic plots while training or to quickly plot the results of a previously saved plot results in a checkpoint directory. |
|
notebooks
Package notebooks allows one to check if running within a notebook.
|
Package notebooks allows one to check if running within a notebook. |
|
plot
Package plots define common types and utilities to the different plot libraries.
|
Package plots define common types and utilities to the different plot libraries. |
Click to show internal directories.
Click to hide internal directories.