> ## Documentation Index
> Fetch the complete documentation index at: https://ibm-llm-runtime-aaf3a78b.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# mellea.backends.adapters.catalog

> Catalog of available intrinsics.

export const SidebarFix = () => <script dangerouslySetInnerHTML={{
  __html: `
        (function () {
          const INTERVAL_MS = 500;

          const upgradeSidebar = () => {
            const links = document.querySelectorAll('a[href^="#"]');

            links.forEach((link) => {
              if (link.dataset.badged === "true") return;

              const rawText = (link.textContent || "").trim();

              // ========== FUNC ==========
              if (rawText.startsWith("FUNC ")) {
                const label = rawText.replace(/^FUNC\\s+/, "").trim();

                while (link.firstChild) link.removeChild(link.firstChild);

                // 👉 Make the whole link a single flex row & prevent wrapping
                link.style.display = "flex";
                link.style.alignItems = "center";
                link.style.whiteSpace = "nowrap";
                link.style.columnGap = "0.5rem";

                const badge = document.createElement("span");
                badge.style.marginRight = "0.5rem";
                badge.style.display = "inline-flex";
                badge.style.alignItems = "center";
                badge.style.borderRadius = "9999px";
                badge.style.padding = "0rem 0.6rem";
                badge.style.fontSize = "0.5rem";
                badge.style.fontWeight = "700";
                badge.style.letterSpacing = "0.05em";
                badge.style.backgroundColor = "rgba(48, 100, 227, 0.20)";
                badge.style.color = "#1D4ED8";

                badge.textContent = "FUNC";

                link.appendChild(badge);
                link.appendChild(document.createTextNode(label));
                link.dataset.badged = "true";
                return;
              }

              // ========== CLASS ==========
              if (rawText.startsWith("CLASS ")) {
                const label = rawText.replace(/^CLASS\\s+/, "").trim();

                while (link.firstChild) link.removeChild(link.firstChild);

                // 👉 Same flex / nowrap treatment for class links
                link.style.display = "flex";
                link.style.alignItems = "center";
                link.style.whiteSpace = "nowrap";
                link.style.columnGap = "0.5rem";

                const badge = document.createElement("span");
                badge.style.marginRight = "0.5rem";
                badge.style.display = "inline-flex";
                badge.style.alignItems = "center";
                badge.style.borderRadius = "9999px";
                badge.style.padding = "0rem 0.6rem";
                badge.style.fontSize = "0.5rem";
                badge.style.fontWeight = "700";
                badge.style.letterSpacing = "0.05em";
                badge.style.backgroundColor = "rgba(74, 222, 128, 0.20)";
                badge.style.color = "#15803D";

                badge.textContent = "CLASS";

                link.appendChild(badge);
                link.appendChild(document.createTextNode(label));
                link.dataset.badged = "true";
                return;
              }
            });
          };

          upgradeSidebar();
          setInterval(upgradeSidebar, INTERVAL_MS);
        })();
      `
}} />;

<SidebarFix />

Catalog of available intrinsics.

Catalog of intrinsics currently known to Mellea,including metadata about where to find
LoRA and aLoRA adapters that implement said intrinsics.

## Functions

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#3064E3]/20 text-[#1D4ED8]">FUNC</span> `validate_revision` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.7.0.dev0/mellea/backends/adapters/catalog.py#L12" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
validate_revision(revision: str) -> str
```

Validate a HuggingFace revision value.

Accepts any non-empty string. HuggingFace's `revision` parameter takes a
branch name, tag, or commit SHA; this validator mirrors that contract.
Catalogue entries pin to commit SHAs by convention; that is enforced by
review and (optionally) build-time drift checks rather than by this
validator.

**Args:**

* `revision`: Any non-empty string accepted by HuggingFace as a
  revision (branch name, tag, or commit SHA).

**Returns:**

* The validated revision unchanged.

**Raises:**

* `ValueError`: If `revision` is empty or whitespace-only.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#3064E3]/20 text-[#1D4ED8]">FUNC</span> `known_intrinsic_names` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.7.0.dev0/mellea/backends/adapters/catalog.py#L155" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
known_intrinsic_names() -> list[str]
```

Return all known user-visible names for intrinsics.

**Returns:**

* List of all known user-visible intrinsic names.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#3064E3]/20 text-[#1D4ED8]">FUNC</span> `fetch_intrinsic_metadata` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.7.0.dev0/mellea/backends/adapters/catalog.py#L164" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
fetch_intrinsic_metadata(intrinsic_name: str) -> IntriniscsCatalogEntry
```

Retrieve information about the adapter that backs an intrinsic.

**Args:**

* `intrinsic_name`: User-visible name of the intrinsic.

**Returns:**

* Metadata about the adapter(s) that implement the
  intrinsic.

**Raises:**

* `ValueError`: If `intrinsic_name` is not a known intrinsic name.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

## Classes

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#4ADE8033]/20 text-[#15803D]">CLASS</span> `AdapterType` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.7.0.dev0/mellea/backends/adapters/catalog.py#L36" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

Possible types of adapters for a backend.

**Attributes:**

* `LORA`: Standard LoRA adapter; value `"lora"`.
* `ALORA`: Activated LoRA adapter; value `"alora"`.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#4ADE8033]/20 text-[#15803D]">CLASS</span> `IntriniscsCatalogEntry` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.7.0.dev0/mellea/backends/adapters/catalog.py#L48" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

A single row in the main intrinsics catalog table.

We use Pydantic for this dataclass because the rest of Mellea also uses Pydantic.

**Attributes:**

* `name`: User-visible name of the intrinsic.
* `internal_name`: Internal name used for adapter loading, or
  `None` if the same as `name`.
* `repo_id`: HuggingFace repository where adapters for the intrinsic
  are located.
* `revision`: HuggingFace revision — branch name, tag, or commit SHA.
  Catalogue entries pin to commit SHAs by convention so loads are
  reproducible; the validator itself only requires a non-empty string.
  Note: this field is stored in the catalogue but not yet forwarded to
  the HuggingFace download call; wiring it through is deferred to a
  subsequent phase of the adapter-lifecycle epic (#929).
* `adapter_types`: Adapter types known to be
  available for this intrinsic; defaults to
  `(AdapterType.LORA, AdapterType.ALORA)`.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />
