Download examples/tutorials/README.md from gexinh/vlm-probe: direct link, hf CLI and curl.
- Browser
- Download file 2.31 kB
-
https://huggingface.co/spaces/gexinh/vlm-probe/resolve/main/examples/tutorials/README.md
- Command line
-
hf download hf://spaces/gexinh/vlm-probe/examples/tutorials/README.md
-
curl -L -o README.md https://huggingface.co/spaces/gexinh/vlm-probe/resolve/main/examples/tutorials/README.md
Runnable method tutorials
These scripts contain the same complete workflows shown in the method guides: load a model, prepare raw inputs, configure a probe, compute results, inspect tensors and draw built-in plots. They do not load archived probe measurements.
From the repository root:
python -m pip install -e ".[transformers,visualization]"
python examples/tutorials/lens_logit.py
| Family | Scripts |
|---|---|
| Lens | Logit, Tuned, Attention Lens, Jacobian, EmbedLens, Patchscope |
| Attention | Profile, Rollout, Relevance, Grad-CAM / ATTATTR / TAM / Beyond Intuition, DTD/LRP, Head logit contributions, Reweighting, Temperature |
| Causal | Activation / attribution patching, Path patching, EAP / EAP-IG, Attention knockout, Steering / VSV |
VLM_PROBING_DEVICE selects a device and VLM_PROBING_OUTPUT selects an output
directory. VLM_PROBING_MODEL optionally supplies a compatible local checkpoint;
otherwise each script uses its stated public model. Keep overrides within the
script's supported model family. Image examples expose their input URL/path and
prompt directly; some also accept VLM_PROBING_IMAGE.
GPT-2 is the text default, SmolVLM-500M the VLM default, and Google ViT-B/16 the vision-classifier default. First use downloads weights. Dense Attention Lens fitting can use several gigabytes of memory and checkpoints even for GPT-2; exact Jacobians and integrated attribution require repeated backwards/forwards. Read the method's cost and calibration notes before starting those scripts.
For a guided sequence and inline outputs, use the live notebooks. Raw sample provenance and image rights are documented there. Short training splits demonstrate the protocol; use independent representative data before interpreting a fitted decoder.