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.4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

transformer_checker-0.1.4-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: transformer_checker-0.1.4.tar.gz
  • Upload date:
  • Size: 9.5 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.4.tar.gz
Algorithm Hash digest
SHA256 12232fe5d053c95101e527a385902a391ea0ca2473e8939de88fc235d66f008d
MD5 1056fa7d6af53e48464998c068e414f5
BLAKE2b-256 1d55ba3bcc6470a34d5c44624d4ee5d34814d247db0078ddf8aab1a96ae269dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for transformer_checker-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 44176a07f389d70ecdc49da41e248fbdb029e6c786bfb0dbbb082f7aa84196af
MD5 169138127667c87a830236525084d032
BLAKE2b-256 7107a4b3c9e5a1855577c7542ae4c9b04fc7f642ec1f794ceace52ecfa40fcc2

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