Skip to main content

Ember-Inspect

ci

A library for using Goodfire Ember models with Inspect AI.

Install

# Install optional dependencies for running examples
pip install ember-inspect[examples]
# Install inspect-evals separately because it's not available on PyPI
pip install "inspect-evals @ git+https://github.com/UKGovernmentBEIS/inspect_evals"

Usage

import os
import dotenv

from inspect_evals.mmlu.mmlu import mmlu_0_shot
from goodfire import Client, Variant
from ember_inspect import eval_variant

# Ensure your GoodFire API key is set
dotenv.load_dotenv(".env")
assert os.getenv("GOODFIRE_API_KEY") is not None, "GOODFIRE_API_KEY is not set"
GOODFIRE_API_KEY = os.getenv("GOODFIRE_API_KEY")

# Create Ember model variant
base_model = "meta-llama/Meta-Llama-3.1-8B-Instruct"
variant = Variant(base_model = base_model)
client = Client(api_key = GOODFIRE_API_KEY)
edits = client.features.AutoSteer(
    specification = "Think like an expert in college biology",
    model = variant,
)
variant.set(edits)

# Evaluate model variant with Inspect
eval_variant(
    variant = variant,
    tasks = [mmlu_0_shot(subjects=["college_biology"])],
    limit = 5,
)

Examples

See examples/ for examples of how to use Ember-Inspect.

  • examples/simple: A simple demo of Ember-Inspect
  • examples/test_time_sae_steering/: Test-time SAE Steering

FAQ

Q: My Inspect tasks aren't completing when I use Ember models. A: This may be due to HTTP rate limits. Wait a minute and try again.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ember_inspect-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ember_inspect-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file ember_inspect-0.1.0.tar.gz.

File metadata

  • Download URL: ember_inspect-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ember_inspect-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93723a6292fdca05cfb85bb6755394553fffb8b01d26d175998763cf57d121a0
MD5 1a900298235fc6f229361cb0c7d40d3b
BLAKE2b-256 52d0e848a0cc3e2c1f54af30cf5d278b2a01ac29d75ac4aeabb771087c775d8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ember_inspect-0.1.0.tar.gz:

Publisher: manual_publish.yaml on dtch1997/ember-inspect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ember_inspect-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ember_inspect-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for ember_inspect-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ac2572c9031ac92308d5c43a8129f028e4b48a4c693314265cf7485dcec01d9
MD5 66928c6877ff7192442e0427a6606553
BLAKE2b-256 5413110c8cb35ee61a16dd1110189c02973d567f29106b627afd8f5b5e8bee67

See more details on using hashes here.

Provenance

The following attestation bundles were made for ember_inspect-0.1.0-py3-none-any.whl:

Publisher: manual_publish.yaml on dtch1997/ember-inspect

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page