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.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d58e68e9ffb503aef8b8bf7120ed9d9ee12d7f0c82d69c0c6e24edc0ee492904 |
|
MD5 | 18eb2300972d94f07ec853e41b3b5b59 |
|
BLAKE2b-256 | b31fe2396e079812c412b42f5b5ac48d3a8dca3190265c9f822e782a3a420240 |
File details
Details for the file transformer_checker-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: transformer_checker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 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 | 3ddd166ef04cda56dac248fd0eaedb396679848fa34d4cea5d7ac800a39c432e |
|
MD5 | 3a776fdf66a6f7adbb617cecc7a91a45 |
|
BLAKE2b-256 | d4210e06fee75aee2ebfbcfd23e247b7f1f0d1d23f7f3dd54be4b9323ced1238 |