Skip to main content

tool to visualize and check neural activations and attention patterns in transformer models that classify context-free languages

Project description

Transformer Checker

This project is a tool to visualize and check neural activations and attention patterns in transformer models that classify context-free languages.

Generating Data

We provide a tool to generate data for training the transformer model. The tool is located in the dyck-k-generation directory. To use the tool, run the following command:

python -m dyck_k_generator.generator --n n --k k --max_length max_length --balanced balanced --file

where n is the number of samples, k is the Dyck-k language, max_length is the maximum length of the strings, balanced is a float between 0 and 1 that represents the percentage of balanced strings, and file is flag that represents whether to save the data to a file or return it to a variable.

Default values are n=500_000, k=3, max_length=1025 and balanced=0.5.

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

transformer_checker-0.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

transformer_checker-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: transformer_checker-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for transformer_checker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d58e68e9ffb503aef8b8bf7120ed9d9ee12d7f0c82d69c0c6e24edc0ee492904
MD5 18eb2300972d94f07ec853e41b3b5b59
BLAKE2b-256 b31fe2396e079812c412b42f5b5ac48d3a8dca3190265c9f822e782a3a420240

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for transformer_checker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ddd166ef04cda56dac248fd0eaedb396679848fa34d4cea5d7ac800a39c432e
MD5 3a776fdf66a6f7adbb617cecc7a91a45
BLAKE2b-256 d4210e06fee75aee2ebfbcfd23e247b7f1f0d1d23f7f3dd54be4b9323ced1238

See more details on using hashes here.

Supported by

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