Tutorials𝞡
We list here a view small examples, that are easy to run locally on a CPU,
to show how to use posteriors:
Additionally, we provide more in depth examples in the examples directory on GitHub, many of which use larger models that require a GPU to run:
bayes_llama3: Usesposteriorsandlightningto train a bayesian ensemble language model Llama-3-8b on the TQA dataset.
continual_lora: Usesposteriors.laplace.diag_fisherto avoid catastrophic forgetting in fine-tuning Llama-2-7b on a series of books from the pg19 dataset.
yelp: Compares a host ofposteriorsmethods (highlighting the easy exchangeability) on a sentiment analysis task adapted from the Hugging Face tutorial.
imdb: Investigates cold posterior effect for a range of approximate Bayesian methods with a CNN-LSTM model on IMDB data, with some interesting takeaways.
continual_regression: Variational continual learning notebook for a simple regression task that's easy to visualize.
pyro_pima_indians_sghmc: An accessible notebook demonstrating the use ofposteriorswith apyro-defined Bayesian logistic regression model, as well as convergence diagnostics frompyro.








