Skip to content
CAI
Software that uses CAICheck a score

elixir-nx/bumblebee

67.1

Adequate · 23 September 2026

32k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Bumblebee is an Elixir library that provides high-level APIs for running pre-trained AI models via Nx.Serving, integrating with the Hugging Face Hub for model discovery and loading. It supports a wide range of tasks including text generation, speech-to-text, image classification, and diffusion-based image generation, with specific implementations for architectures like Whisper, Stable Diffusion, and various transformer models. The system handles end-to-end pipelines including preprocessing, inference, and post-processing, while offering utilities for efficient backend configuration, PyTorch weight conversion, and multimodal processing.

How it got here

2022 — Bumblebee library launch and multimodal expansion

28 changes.

This period marks the initial release of the Bumblebee library, establishing high-level APIs for AI inference across text, audio, and vision tasks using Nx and EXLA. The work rapidly expanded the library's scope by integrating Hugging Face model loading, adding decoder caching for efficient generation, and introducing support for diffusion models with ControlNet. It also broadened capabilities to include multimodal architectures like BLIP and CLIP, alongside comprehensive test coverage and practical Phoenix LiveView examples.

2023–2024 — Whisper integration and PyTorch conversion

7 changes.

This period focused on adding Whisper speech-to-text capabilities, including model specs, serving with chunking, and comprehensive test coverage. It also introduced support for loading pre-trained PyTorch model weights directly into Bumblebee, alongside vectorized improvements to text generation logits processing.

Features

Add BLIP, CLIP, and LayoutLM multimodal model support

Users can now utilize three new multimodal architectures within Bumblebee: BLIP for text-image similarity and conditional generation, CLIP for text-image similarity with cosine similarity logits, and LayoutLM for document understanding tasks including masked language modeling, sequence classification, token classification, and question answering. These additions expand the library's capabilities to handle complex vision-language and document layout inputs alongside standard text processing.

lib/bumblebee/multimodal · high confidence

Add Phoenix LiveView examples for image, text, and speech tasks

New single-file Phoenix LiveView applications have been added to the examples directory, demonstrating how to integrate Bumblebee with Phoenix Playgrounds. These examples include image classification, text classification, and speech-to-text demos that utilize EXLA for compiled inference and Nx.Serving for batched prediction handling. The speech-to-text example specifically implements client-side audio preprocessing to send raw PCM data, while the image example handles client-side resizing and decoding to optimize network and server performance.

examples · high confidence

Add Stable Diffusion with ControlNet support

Users can now condition Stable Diffusion image generation on spatial inputs (such as edges, poses, or depth maps) using the ControlNet architecture. This change introduces the \Bumblebee.Diffusion.ControlNet\ model spec, the \Bumblebee.Diffusion.StableDiffusionControlNet\ high-level serving for text-to-image generation with conditioning, and supporting components including the \UNet2DConditional\ model (which accepts additional down-block and mid-block states for skip connections), new diffusion schedulers (\DDIM\, \PNDM\, and \LCM\), and shared diffusion layers.

lib/bumblebee/diffusion · high confidence

Add UNet layer implementation for diffusion models

Introduces the \Bumblebee.Diffusion.Layers.UNet\ module, providing the core building blocks for U-Net architectures used in diffusion models. This includes functions for timestep embedding MLPs, as well as downsample and upsample blocks (2D) that support residual connections, cross-attention mechanisms via encoder hidden states, and configurable parameters for channels, dropout, normalization, and activation functions.

lib/bumblebee/diffusion/layers · high confidence

Add Whisper speech-to-text model and serving

This change introduces the Whisper model family for speech-to-text tasks, including the \Bumblebee.Audio.Whisper\ model spec, a \WhisperFeaturizer\ for extracting Mel-frequency features from audio, and a \SpeechToTextWhisper\ serving module. The serving implementation supports chunking for long-form transcription, configurable language and task settings (transcribe vs translate), optional timestamp generation, and streaming output, allowing users to transcribe audio files or tensors via an Nx.Serving interface.

lib/bumblebee/audio · high confidence

Added safety checker for Stable Diffusion

A new safety-checking component has been added to the Stable Diffusion pipeline to detect potentially unsafe or sensitive image content. This feature integrates a CLIP-based model that analyzes generated images against predefined sensitive and unsafe concept embeddings, flagging content that exceeds specific cosine-similarity thresholds. Users can now enable this check to filter out inappropriate outputs before they are finalized.

_lib/bumblebee/diffusion/stable\diffusion · high confidence

Initial project scaffolding and documentation

The repository is initialized with core documentation files including AGENTS.md, CHANGELOG.md, and README.md, establishing the project's structure and usage guidelines. The README provides installation instructions for Bumblebee with Nx and EXLA, usage examples for loading HuggingFace models, and details on HuggingFace Hub integration. A LICENSE file (Apache 2.0) is added, and the .formatter.exs is configured to include the :nx dependency and example files in formatting inputs.

(repo-wide) · high confidence

Initial release of Bumblebee high-level AI serving library

Introduces the Bumblebee library, providing high-level APIs for running AI models via Nx.Serving. The release adds dedicated modules for audio (Whisper speech-to-text with chunking and streaming), text (generation with streaming and token classification with aggregation), and vision (image classification, image-to-text, and embeddings). It also establishes core infrastructure including configurable interfaces for models, tokenizers, and featurizers, along with utilities for logits processing, scheduling, and HTTP configuration.

lib/bumblebee · high confidence

Initial release of Bumblebee library

This change introduces the Bumblebee library, providing pre-trained Axon models for easy inference and training. It integrates with Hugging Face Hub to streamline loading pre-trained models and includes high-level task servings (such as fill-mask) that handle end-to-end pipelines including preprocessing, model execution, and post-processing. The library supports a wide range of architectures including BERT, GPT-2, LLaMA, and Stable Diffusion, and allows users to configure efficient Nx backends like EXLA or Torchx for production usage.

lib · high confidence

Introduce Hugging Face model caching and download logic

Adds the \Bumblebee.HuggingFace.Hub\ module, which provides the underlying mechanism for downloading and caching model files from Hugging Face repositories. This change introduces support for offline mode (loading models strictly from local cache without network traffic), ETag-based cache validation to avoid re-downloading unchanged files, and handling of repository redirects and authentication tokens. Users can now configure a custom cache directory and benefit from improved error messages for common issues like missing repositories or gated access.

lib/bumblebee/huggingface · high confidence

Introduce dedicated utility modules for Axon, HTTP, image, and progress handling

This change introduces a new \Bumblebee.Utils\ namespace containing specialized helper modules to centralize common functionality. \Bumblebee.Utils.Axon\ provides utilities for inspecting and transforming Axon model graphs, such as listing nodes with names, zipping and mapping containers, and prefixing or replacing layer names. \Bumblebee.Utils.HTTP\ implements robust HTTP operations, including file downloads with cancellation support when the caller terminates, and generic request handling with SSL and redirect options. \Bumblebee.Utils.Image\ adds image preprocessing capabilities, such as normalizing batch dimensions, sizes, and channel counts. \Bumblebee.Utils.Nx\ offers tensor and container manipulation functions like recursive mapping, zipping, batching, and concatenation. Additionally, \Bumblebee.Utils.ProgressBar\ replaces previous progress bar implementations with a custom, terminal-width-aware progress indicator that supports byte-unit formatting and configurable step intervals.

lib/bumblebee/utils · high confidence

Introduces decoder caching infrastructure for efficient autoregressive generation

Adds \Bumblebee.Layers.Decoder\ and \Bumblebee.Layers.Transformer\ modules to support iterative sequence generation with key-value caching. This enables models to reuse hidden states across autoregressive steps, significantly reducing computation time during inference. The implementation includes cache initialization, incremental key-value appending, and support for cross-attention caching, forming the foundation for efficient text generation capabilities.

lib/bumblebee/layers · high confidence

New and updated notebooks for Qwen3, FunctionGemma, and Stable Diffusion

The notebooks directory now includes dedicated examples for Qwen3 (text generation, embeddings, and reranking) and FunctionGemma (function calling with schema building and parsing), alongside updated guides for Stable Diffusion (now supporting negative prompts), LLMs (Llama 2, Mistral), and RAG. The examples.livemd index has been refreshed to reflect these additions, and the fine\_tuning notebook has been updated to use the latest Bumblebee and Axon versions.

notebooks · high confidence

New text model implementations added to Bumblebee

This release adds support for several new transformer architectures in the \lib/bumblebee/text\ directory, including ALBERT, BART, BERT, Blenderbot, BLIP Text, CLIP Text, Cross-Encoder, DistilBERT, Fill-Mask, Gemma, and Gemma 3. These new modules provide model definitions and serving capabilities for tasks such as sequence classification, token classification, question answering, causal language modeling, and text embedding, expanding the library's coverage of popular NLP models.

lib/bumblebee/text · high confidence

New vision models and serving tasks

This release adds support for several new computer vision architectures and their corresponding high-level serving tasks. New model implementations include BiT, BLIP, CLIP, ConvNeXt, DeiT, DINOv2, and ResNet, each with specific featurizers for image preprocessing (resizing, cropping, normalization). These models expose various architectures such as base encoders, image classification heads, masked image modeling, and embedding projections. To make these models immediately usable, new serving modules have been introduced: \ImageClassification\ for top-k label prediction, \ImageEmbedding\ for extracting feature vectors (with optional L2 normalization), and \ImageToText\ for conditional generation tasks like image captioning, integrating with the text generation configuration.

lib/bumblebee/vision · high confidence

Support for loading PyTorch model state dictionaries

Users can now load pre-trained weights from PyTorch models directly into Bumblebee. This change introduces a new PyTorch loader that handles both modern zip-based and legacy serialization formats, automatically deserializing PyTorch tensors into Nx tensors. It includes support for lazy loading of large tensor files to manage memory efficiently and provides utilities to map PyTorch parameter names to Axon model layers, allowing seamless integration of existing PyTorch models.

lib/bumblebee/conversion · high confidence

Behavioural changes

Configure EXLA backend inspection behavior

The application now includes a configuration file that sets the \:add\_backend\_on\_inspect\ option for the EXLA library. This setting ensures that the backend is added during inspection unless the application is running in the test environment, which helps manage output verbosity and performance during testing.

config · high confidence

Introduce explicit parameter mapping for HuggingFace model loading

The HuggingFace Transformers integration now supports explicit parameter mapping, allowing users to define precise relationships between Axon model layers and HuggingFace model parameters. This change introduces new protocols (\Bumblebee.HuggingFace.Transformers.Config\ and \Model\) and utility functions to handle complex parameter transformations, such as transposing weights or handling specific layer naming conventions, ensuring more accurate model loading and compatibility with recent checkpoint formats.

lib/bumblebee/huggingface/transformers · high confidence

Introduce vectorized logits processing with new sampling and constraint options

The text generation module now uses a new \LogitsProcessing\ module that vectorizes common operations like temperature scaling, top-k, and top-p filtering, replacing the previous stateful approach. This change adds support for multinomial sampling, allows configuring multiple end-of-sequence (EOS) tokens, and enables Whisper-specific timestamp and task/language configuration. Users can now fine-tune generation behavior with temperature, top-k, top-p, and various token suppression or forcing strategies directly through the generation options.

lib/bumblebee/text/generation · high confidence

Test coverage

Added PyTorch test fixture generation script; Added audio test fixtures and generation script; Added test coverage for Stable Diffusion components and schedulers; Added test coverage for new vision models and serving capabilities; Added test coverage for numerous text models and generation logic; Added test helper module for assertions and scheduler simulation; Added tests for BLIP, CLIP, and LayoutLM multimodal models; Added tests for HuggingFace Hub cached download behavior; Added tests for PyTorch model conversion and parameter loading; Added tests for Whisper speech-to-text serving and model components; Added tests for logits processing in text generation; Added tests for shared label validation logic; Added tests for the Stable Diffusion safety checker; Added unit tests for Bumblebee utility modules; Expanded test coverage for model loading and configuration.

Dependencies

Bumblebee 0.8.0 release with major Nx and Axon upgrades

This release bumps the project version to 0.8.0 and upgrades the core dependencies to Nx 1.0, Axon 0.9.0, and EXLA 1.0, requiring Elixir 1.15 or later. It also introduces new dependencies for image processing (nx\_image 0.2.0), tokenization (tokenizers 0.4), and model loading (unpickler 0.1.0, safetensors 0.2.0), while adding nx\_signal 0.4.0 and updating dev/test tools like ExDoc and bypass.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 58 → 67 (+9.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 89 → 92 (+3.3)
  • Architecture 97 → 98 (+1.0)
  • Maturity 47 → 52 (+4.9)
  • Readiness 50 → 67 (+17.4)
  • Security 78 → 94 (+15.6)

Resolved (123)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (10 lines × 2) (lib/bumblebee/diffusion/controlnet.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/text/bart.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/text/llama.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/text/modernbert.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/vision/deit.ex)
  • Duplicated block (10 lines × 4) (lib/bumblebee/text/bart.ex)
  • Duplicated block (10 lines × 4) (lib/bumblebee/text/fill_mask.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/diffusion/stable_diffusion.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/diffusion/vae_kl.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/text/modernbert.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/text/text_classification.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/text/translation.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/vision/blip_vision.ex)
  • Duplicated block (11 lines × 3) (lib/bumblebee/text/bert.ex)
  • Duplicated block (11 lines × 3) (lib/bumblebee/vision/blip_featurizer.ex)
  • Duplicated block (11 lines × 3) (lib/bumblebee/vision/deit.ex)
  • Duplicated block (11 lines × 5) (lib/bumblebee/text/bart.ex)
  • Duplicated block (12 lines × 2) (lib/bumblebee/audio/speech_to_text_whisper.ex)
  • …and 103 more

New (211)

  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (10 lines × 10) (lib/bumblebee/text/gemma.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/diffusion/layers/unet.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/text/bert.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/text/translation.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/vision/bit_featurizer.ex)
  • Duplicated block (10 lines × 2) (lib/bumblebee/vision/deit.ex)
  • Duplicated block (10 lines × 3) (lib/bumblebee/text/gemma.ex)
  • Duplicated block (10 lines × 7) (lib/bumblebee/text/gemma.ex)
  • Duplicated block (10–11 lines × 3) (lib/bumblebee/text/bert.ex)
  • Duplicated block (10–13 lines × 5) (lib/bumblebee/text/bart.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/diffusion/stable_diffusion.ex)
  • Duplicated block (11 lines × 2) (lib/bumblebee/diffusion/stable_diffusion/safety_checker.ex)
  • Duplicated block (11 lines × 3) (lib/bumblebee/vision/deit.ex)
  • Duplicated block (11 lines × 3) (lib/bumblebee/vision/image_classification.ex)
  • Duplicated block (11 lines × 5) (lib/bumblebee/audio/whisper.ex)
  • Duplicated block (11 lines × 5) (lib/bumblebee/text/bert.ex)
  • Duplicated block (11 lines × 7) (lib/bumblebee/diffusion/stable_diffusion.ex)
  • Duplicated block (11–12 lines × 2) (lib/bumblebee/diffusion/stable_diffusion.ex)
  • Duplicated block (11–13 lines × 2) (lib/bumblebee/diffusion/stable_diffusion.ex)
  • …and 191 more

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • (root) — 2 commits

Notable commits

  • change: Release v0.8.0
  • change: update to nx 1.0 (#465)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

elixir-nx/bumblebee was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9bb36116d1b25c8e25d796fc4a003e64ad5db295 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.