Sample posterior weights

sample provides models, data loading, ensemble initialization, posterior sampling and lossless trajectory storage for Bayesian neural networks. It uses JAX and Flax, with declarative YAML or JSON configurations and explicit input and output locations.

Start here

  • Getting started: install the package and run a small regression example on one CPU device.
  • Models and data: supported architectures, tasks, dataset sources, splits and preprocessing.
  • Training and sampling: configuration, execution phases, sampler families, seeds and artifacts.
  • Inference and evaluation: select stored draws, batch predictions and request predictive or chain diagnostics.

Package structure

ModuleResponsibility
sample.configValidated configurations for data, models, training and evaluation
sample.architecturesRegistered tabular, image and text models
sample.datasetData loading, split selection and fitted preprocessing
sample.bnnsPriors, likelihoods and the sampled model position
sample.trainingEnsemble initialization, sampling and evaluation stages
sample.kernelsSampler constructors and adaptation capabilities
sample.artifactsDeclarative tree schemas and posterior trajectory storage
sample.inferenceBatched sample reading, prediction and evaluation
sample.provenanceAcquisition identities and replay verification

sample is independent of alignment and experiment orchestration. Applications pass explicit locations and parameter trees; campaign management, fitting selections and scientific publication belong to the consuming application.

The package is a fork of SMILE. Attribution and citation entries are retained in packages/sample/README.md.