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
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12232fe5d053c95101e527a385902a391ea0ca2473e8939de88fc235d66f008d |
|
MD5 | 1056fa7d6af53e48464998c068e414f5 |
|
BLAKE2b-256 | 1d55ba3bcc6470a34d5c44624d4ee5d34814d247db0078ddf8aab1a96ae269dd |
File details
Details for the file transformer_checker-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: transformer_checker-0.1.4-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44176a07f389d70ecdc49da41e248fbdb029e6c786bfb0dbbb082f7aa84196af |
|
MD5 | 169138127667c87a830236525084d032 |
|
BLAKE2b-256 | 7107a4b3c9e5a1855577c7542ae4c9b04fc7f642ec1f794ceace52ecfa40fcc2 |