xnn.hybnn.models.byteff_foundation#

The released ByteFF and ByteFF-Pol networks in xnn.

The authors publish five independently trained ByteFF networks (ByteFF-26, whose parameters are averaged) and one ByteFF-Pol network (ByteFF-Pol-25). They are distributed under the Creative Commons Attribution-NonCommercial 4.0 license (CC BY-NC 4.0): xnn does not ship them, the model hub downloads them on first use and states the terms when they load.

  • from_foundation() builds a bound or unbound model from a released name ("byteff-26", "byteff-26-member-1", …, "byteff-pol-25");

  • the hub format "byteff2" converts one released checkpoint (a state dict saved under "model_state_dict") into a ByteFF or ByteFFPol, so from_pretrained loads every single network;

  • convert_state_dict() and architecture() map such a state dict onto one ensemble member of the xnn model.

Module Attributes

FOUNDATION_MODELS

name -> the hub cards of their members.

Functions

architecture(state)

The xnn class and options of a released state dict, read from its shapes.

convert_state_dict(state)

Map a released state dict onto one ensemble member of the xnn model.

from_byteff2(paths, *[, structure, dtype, ...])

Build an xnn model from released checkpoint files, one per ensemble member.

from_foundation([name, structure, ...])

Load a released ByteFF or ByteFF-Pol model through the model hub.