Skip to content

Releases: ApolloResearch/rib

v2.0.0

20 May 09:34

Choose a tag to compare

What's Changed

Full Changelog: v1.0...v2.0.0

v1.0

19 Jan 11:01
648a674

Choose a tag to compare

Breaking Changes

Many. The most important being that:

  1. All rib build experiments were combined and can be run fromrib_scripts/rib_build and all ablation experiments were combined and can be run from rib_scripts/ablations.
  2. Rib build outputs a RibBuildResults pydantic object.

Some more detailed breaking changes are given in the PR descriptions that were merged for this release.

What's Changed

Full Changelog: v0.2...v1.0

v0.2

04 Dec 12:32
65db1cf

Choose a tag to compare

What's Changed

  • Support CIFAR model training by @nix-apollo in #223. Breaking Changes:
    • Moved and renamed files and folders that referenced MNIST
    • Moved the mlp experiment file's ModelConfig, that is now MlpConfig in models/mlp.py
    • MLP configs require input and output size.
  • Support different bases and edges formulas by @stefan-apollo in #219
  • Forbid extra args in pydantic configs by @danbraunai-apollo in #237. Breaking Changes
    • Any configs that contained arguments which weren't valid for that config will not throw a pydantic ValidationError.
  • Tiny stories support by @nix-apollo in #232
  • Add svd basis by @nix-apollo in #239
  • Support return_set_frac and n_samples for all datasets by @danbraunai-apollo in #238. Breaking Changes
    • No longer supports passing "both" as a return_set argument.
    • Previously, VisionDataset had a return_set_frac that took samples from the start of the dataset. This change will therefore be a breaking change for configs that previously defined a return_set_frac. VisionDataset is a new thing, and Nix said that this isn't a concern.

Full Changelog: v0.1...v0.2

v0.1

29 Nov 17:18
d1e3715

Choose a tag to compare

Breaking Changes

Update transformer-lens (#222)

  • You must re-install the rib package in your environment as the requirements have changed.

MLP complete rewrite in #201

  • MLP layers and models have an updated interface and fold biases in a very different way. In particular, note:
    • You can't train after folding the bias
    • You can't fold the bias of sigmoid or tanh models, as there is no x where act(x)=1 for these functions.
    • MLP models and layers now have a .has_bias_folded and .fold_bias attribute. This is the preferred interface for bias folding.
    • Renamed mlp Layer class to MLPLayer (especially as it's imported into rib.models namespace)
  • Old MLP models will no longer be able to be loaded.

Return values and out_dirs (#213)

  • Previously a main method would return None if the user decided not to overwrite the file. Now it raises a FileExistsError. This is so the main method can have a non-optional return type.
  • changed the meaning of out_dir=None to not write an output file. The default is still .out/
  • AblationConfigs can no longer have no experiment name. Previously this was used to have no output file. In able to have no output file, pass out_dir = None instead.

Can no longer pass eps to an lm_rib_build or lm_ablation config (#225)

What's Changed

New Contributors

Full Changelog: v0.0...v1.0

v0.0

15 Nov 12:12
2bb92a2

Choose a tag to compare

State of Project

  • Runs single-process RIB on MNIST, modular addition, and Pythia-14m (although the latter will take many days/weeks to compute all edges).
  • Calculates ablation curves

Recent Updates

Normalize gradients in edge calculation #189
Normalizes gradients by the dataset_size and token dimension before summing with the input tensor

Implement split-up Attention module #180
Splits Atttention (attn) into AttentionIn (attn_in) and AttentionOut (attn_out). attn_in just creates the KQV activations, and attn_out handles the rest

Replace jacrev with for loop #185
Uses a for loop instead of jacrev for the edge calculation

Refactor SequentialTransformer for cleanliness #183
Refactors SequentialTransformer and major cleanup of it's docs and structure. I recommend having a read of the full file, it might clear things up for you about how this class works and what module_id and section_ids are.

Map for module_id to section_id mapping #182

Introduces a mapping function between a section_id (e.g. sections.section_2.3 to a module_id (e.g. mlp_out.3 ). E.g. you can do:

>> model = SequentialTransformer(cfg, node_layers)
>> print(model.section_id_to_module_id["sections.section_2.3"])
mlp_out.3