How model support works in Bumblebee
mainBumblebee is an Elixir counterpart to the Python Transformers library. It does not store the actual model weights itself, but rather implements the logic to fetch and pair trained parameters with a model architecture.
Key Requirements:
- Implementation: The model architecture must be implemented in Bumblebee. You can verify this by checking if the class name under
"architectures"in the repository'sconfig.jsonexists in the Bumblebee codebase. - Format: Bumblebee supports
pytorch_model.bin(PyTorch) andmodel.safetensors(Safetensors). It does not support Flax (flax_model.msgpack) or Tensorflow (tf_model.h5) formats. - Subdirectories: If a repository contains multiple models (e.g.,
stabilityai/stable-diffusion-2), use thesubdiroption:Bumblebee.load_model({:hf, "model-repo", subdir: "..."}).