Skip to main content

Multimodal explainability tool for NLP based on Shapley value.

Project description

📦 nlp-shap

Multimodal explainability for NLP and multimodal models based on Shapley-style cooperative game theory.

PyPI Python Documentation License

Installation

pip install nlp-shap

From source:

git clone https://github.com/Pawlo77/nlp-shap
cd nlp-shap
make install

Requires Python 3.12 and uv.

Documentation

Full documentation: pawlo77.github.io/nlp-shap

Examples

Runnable Jupyter notebooks in examples/:

Notebook What it demonstrates
estimands_toy_game.ipynb Shapley vs Banzhaf aggregators, coalition weights, labelled results, manifests, plugin entry points
masking_views.ipynb Token partitioning, absence policies, masked views, mask codec, mask space, plugin registry
runtime_core.ipynb Run archive, coalition dedup, hot LRU cache, async scheduler with bounded concurrency

Setup and details: examples/README.md. Embedded walkthroughs: docs/examples.

Development

make install
make check

Run make help for other targets.

License

Apache License 2.0. See LICENSE.

Copyright 2026 Paweł Pozorski.

Project details


Download files

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

Source Distribution

nlp_shap-0.1.4.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

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

nlp_shap-0.1.4-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file nlp_shap-0.1.4.tar.gz.

File metadata

  • Download URL: nlp_shap-0.1.4.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nlp_shap-0.1.4.tar.gz
Algorithm Hash digest
SHA256 07f9e7aa396680e0e0f2e3d7a083d89556fdba225ab3223122aa0b3d9cc82c62
MD5 71c2dc1e853e40f868d2eddfaa896487
BLAKE2b-256 9efb55adc70284f92f54f4d286cdf7994a1c9dec2b670d3de87b7cb0e721c56a

See more details on using hashes here.

File details

Details for the file nlp_shap-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: nlp_shap-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nlp_shap-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 48d8203f2f4d28b1a0d0456b7d35adcfdb6697f103382fdb12897e0a088cbad8
MD5 9d06e9a4782ee93444e52fe04c90e575
BLAKE2b-256 67ee8e16e6ab81e2cf99176add1282ded15ebc1d69fc30db5afb3b326d4b9f61

See more details on using hashes here.

Supported by

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