Qwen3-32b fails on from_pretrained

#4
by jacopoteneggi - opened

To reproduce:

import json
import sys
from importlib.metadata import distribution, version

from jlens import JacobianLens

REPO = "neuronpedia/jacobian-lens"
FILENAME = "qwen3-32b/jlens/Salesforce-wikitext/Qwen3-32B_jacobian_lens.pt"


def main():
    print("==== Environment ====")
    print(f"Python: {sys.version}")
    for package in ("jlens", "torch", "huggingface_hub"):
        print(f"{package}: {version(package)}")
    print()

    print("==== Loading Lens ====")
    direct_url = distribution("jlens").read_text("direct_url.json")
    if direct_url:
        commit = json.loads(direct_url).get("vcs_info", {}).get("commit_id")
        print(f"jlens commit: {commit}")
    print(f"Loading {REPO}/{FILENAME}")
    lens = JacobianLens.from_pretrained(REPO, filename=FILENAME)
    print(f"Loaded successfully: {lens}")


if __name__ == "__main__":
    main()

raises the following exception:

==== Environment ====
Python: 3.13.2 (main, Jun 10 2025, 13:41:48) [GCC 13.3.0]
jlens: 0.1.0
torch: 2.9.1+cu128
huggingface_hub: 1.11.0

==== Loading Lens ====
jlens commit: 581d398613e5602a5af361e1c34d3a92ea82ba8e

Loading neuronpedia/jacobian-lens/qwen3-32b/jlens/Salesforce-wikitext/Qwen3-32B_jacobian_lens.pt
[...]
ValueError: .../qwen3-32b/jlens/Salesforce-wikitext/Qwen3-32B_jacobian_lens.pt is not a JacobianLens file (found keys ['jacobian_sum', 'n_done', 'next_idx', 'source_layers']; a fit() checkpoint?)

thank you for your help!

neuronpedia org

Hello - apologies for this. The format was incorrect and incomplete, we just re-fitted these and reuploaded them. Please try again.

neuronpedia-org changed discussion status to closed

Sign up or log in to comment