Skip to content

feat(probe): discover probe slots in adapter libraries - #170

Open
IRENEKO wants to merge 1 commit into
generative-computing:mainfrom
IRENEKO:feature/probe-library-discovery
Open

IRENEKO wants to merge 1 commit into
generative-computing:mainfrom
IRENEKO:feature/probe-library-discovery

Conversation

@IRENEKO

@IRENEKO IRENEKO commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Probe slots could only be composed from a YAML manifest. A library can now ship a
probe the same way it ships a LoRA, so --adapters <library> picks it up:

<name>/<target_model>/probe/
├── probe_head.safetensors
├── probe_config.json   # {"labels": ["no", "yes"], "layer": 24}
└── io.yaml

The slot is named <name>_probe, so a probe can sit next to a LoRA of the same
name (in one library, or across two libraries composed together). layer is
optional; omitted means the final post-norm state, as in the manifest.

Changes:

  • discover_adapters accepts probe as a technology and requires the probe files
    instead of adapter_model.safetensors / adapter_config.json. Probes are left out
    of the module-contribution report, which reads adapter_config.json.
  • Compose reads labels and layer from each discovered probe's probe_config.json
    into the same probe_meta the manifest path fills.
  • The compose report skips LoRA analysis when every slot is a probe. A probe-only
    compose used to crash there (KeyError: 'adapter_names').

Hub libraries need no download change: a probe/ folder falls under the existing
<name>/<model>/** fallback pattern.

Testing

  • tests/composer/test_adapter_filtering.py: a LoRA and a probe under one name are
    both discovered, as ans and ans_probe.
  • tests/composer/test_selective_download.py: a Hub probe folder is in the download
    patterns.
  • tests/composer/test_probe_compose.py: two CLI end-to-end composes. One is a
    probe-only library (granite-4.0-micro). The other is answerability/.../lora/ plus
    answerability/.../probe/ (granite-4.1-3b), which gives slots answerability and
    answerability_probe.
  • Passed on an H100: composer CPU tests 42/42, test_probe_compose.py 14/14,
    test_compose_e2e.py 9/9.

A library can now ship a probe as <name>/<model>/probe/ with
probe_head.safetensors and probe_config.json (labels, layer), so
--adapters <library> composes it without a manifest. The slot is named
<name>_probe, so it can sit next to a LoRA of the same name. The compose
report skips LoRA analysis when every slot is a probe, which used to crash.

Signed-off-by: IRENEKO <cyko@ibm.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants