├── .github └── workflows │ ├── build-wheels.yml │ └── test.yml ├── .gitignore ├── .mailmap ├── LICENSE ├── README.rst ├── docs ├── api_docs │ └── index.html ├── attention.md ├── builders.md ├── custom_attention_layer.md ├── events.md ├── feature_maps.md ├── index.md ├── masking.md ├── recurrent_transformers.md ├── tips_and_tricks.md └── transformers.md ├── fast_transformers ├── __init__.py ├── aggregate │ ├── __init__.py │ ├── aggregate_cpu.cpp │ ├── aggregate_cuda.cu │ └── clustered_aggregate_cuda.cu ├── attention │ ├── __init__.py │ ├── aft_attention.py │ ├── attention_layer.py │ ├── causal_linear_attention.py │ ├── clustered_attention.py │ ├── conditional_full_attention.py │ ├── exact_topk_attention.py │ ├── full_attention.py │ ├── improved_clustered_attention.py │ ├── improved_clustered_causal_attention.py │ ├── linear_attention.py │ ├── local_attention.py │ └── reformer_attention.py ├── attention_registry │ ├── __init__.py │ ├── registry.py │ └── spec.py ├── builders │ ├── __init__.py │ ├── attention_builders.py │ ├── base.py │ └── transformer_builders.py ├── causal_product │ ├── __init__.py │ ├── causal_product_cpu.cpp │ └── causal_product_cuda.cu ├── clustering │ ├── __init__.py │ └── hamming │ │ ├── __init__.py │ │ ├── cluster_cpu.cpp │ │ └── cluster_cuda.cu ├── events │ ├── __init__.py │ ├── event.py │ ├── event_dispatcher.py │ └── filters.py ├── feature_maps │ ├── __init__.py │ ├── base.py │ └── fourier_features.py ├── hashing │ ├── __init__.py │ ├── hash_cpu.cpp │ └── hash_cuda.cu ├── local_product │ ├── __init__.py │ ├── local_product_cpu.cpp │ └── local_product_cuda.cu ├── masking.py ├── recurrent │ ├── __init__.py │ ├── _utils.py │ ├── attention │ │ ├── __init__.py │ │ ├── cross_attention │ │ │ ├── __init__.py │ │ │ ├── attention_layer.py │ │ │ ├── full_attention.py │ │ │ └── linear_attention.py │ │ └── self_attention │ │ │ ├── __init__.py │ │ │ ├── attention_layer.py │ │ │ ├── full_attention.py │ │ │ └── linear_attention.py │ └── transformers.py ├── sparse_product │ ├── __init__.py │ ├── clustered_sparse_product_cpu.cpp │ ├── clustered_sparse_product_cuda.cu │ ├── sparse_product_cpu.cpp │ └── sparse_product_cuda.cu ├── transformers.py ├── utils.py └── weight_mapper.py ├── mkdocs.yml ├── setup.py ├── tests ├── __init__.py ├── aggregate │ ├── __init__.py │ ├── test_aggregate_cpu.py │ ├── test_aggregate_gpu.py │ ├── test_clustered_aggregate_cpu.py │ ├── test_clustered_aggregate_gpu.py │ ├── test_clustered_broadcast_cpu.py │ └── test_clustered_broadcast_gpu.py ├── attention │ ├── test_aft_attention.py │ ├── test_attention_layer.py │ ├── test_causal_linear_attention.py │ ├── test_clustered_transformer.py │ ├── test_clustered_transformer_gpu.py │ ├── test_full_attention.py │ ├── test_improved_clustered_transformer_gpu.py │ ├── test_linear_attention.py │ └── test_local_attention.py ├── causal_product │ ├── __init__.py │ ├── test_causal_product.py │ ├── test_causal_product_cpu.py │ └── test_causal_product_gpu.py ├── clustering │ ├── __init__.py │ └── hamming │ │ ├── __init__.py │ │ ├── test_cluster_cpu.py │ │ ├── test_cluster_gpu.py │ │ ├── test_python_api_gpu.py │ │ └── time_python_api_gpu.py ├── events │ ├── __init__.py │ ├── test_event_dispatcher.py │ ├── test_event_filters.py │ └── test_events.py ├── feature_maps │ ├── __init__.py │ └── test_fourier_features.py ├── hashing │ ├── __init__.py │ ├── test_hash_cpu.py │ └── test_hash_gpu.py ├── local_product │ ├── test_local_product_cpu.py │ └── test_local_product_cuda.py ├── recurrent │ ├── __init__.py │ ├── attention │ │ ├── __init__.py │ │ ├── cross_attention │ │ │ ├── __init__.py │ │ │ ├── test_attention_layer.py │ │ │ ├── test_full_attention.py │ │ │ └── test_linear_attention.py │ │ └── self_attention │ │ │ ├── __init__.py │ │ │ ├── test_attention_layer.py │ │ │ ├── test_full_attention.py │ │ │ └── test_linear_attention.py │ ├── test_transformer_decoder.py │ └── test_transformer_encoder.py ├── sparse_product │ ├── __init__.py │ ├── test_clustered_sparse_product_backward_cpu.py │ ├── test_clustered_sparse_product_backward_cpu_v2.py │ ├── test_clustered_sparse_product_backward_gpu.py │ ├── test_clustered_sparse_product_cpu.py │ ├── test_clustered_sparse_product_cpu_v2.py │ ├── test_clustered_sparse_product_gpu.py │ ├── test_clustered_sparse_weighted_average_cpu.py │ ├── test_clustered_sparse_weighted_average_cpu_v2.py │ ├── test_clustered_sparse_weighted_average_gpu.py │ ├── test_sparse_product_backward_cpu.py │ ├── test_sparse_product_backward_gpu.py │ ├── test_sparse_product_cpu.py │ ├── test_sparse_product_gpu.py │ ├── test_sparse_weighted_average_cpu.py │ └── test_sparse_weighted_average_gpu.py ├── test_builders.py ├── test_masking.py ├── test_transformer_decoder.py ├── test_transformer_encoder.py └── test_weight_mapper.py └── tools.py /.github/workflows/build-wheels.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/.github/workflows/build-wheels.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/.gitignore -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/.mailmap -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/LICENSE -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/README.rst -------------------------------------------------------------------------------- /docs/api_docs/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/api_docs/index.html -------------------------------------------------------------------------------- /docs/attention.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/attention.md -------------------------------------------------------------------------------- /docs/builders.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/builders.md -------------------------------------------------------------------------------- /docs/custom_attention_layer.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/custom_attention_layer.md -------------------------------------------------------------------------------- /docs/events.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/events.md -------------------------------------------------------------------------------- /docs/feature_maps.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/feature_maps.md -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/index.md -------------------------------------------------------------------------------- /docs/masking.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/masking.md -------------------------------------------------------------------------------- /docs/recurrent_transformers.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/recurrent_transformers.md -------------------------------------------------------------------------------- /docs/tips_and_tricks.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/tips_and_tricks.md -------------------------------------------------------------------------------- /docs/transformers.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/docs/transformers.md -------------------------------------------------------------------------------- /fast_transformers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/__init__.py -------------------------------------------------------------------------------- /fast_transformers/aggregate/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/aggregate/__init__.py -------------------------------------------------------------------------------- /fast_transformers/aggregate/aggregate_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/aggregate/aggregate_cpu.cpp -------------------------------------------------------------------------------- /fast_transformers/aggregate/aggregate_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/aggregate/aggregate_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/aggregate/clustered_aggregate_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/aggregate/clustered_aggregate_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/attention/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/__init__.py -------------------------------------------------------------------------------- /fast_transformers/attention/aft_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/aft_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/attention_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/attention_layer.py -------------------------------------------------------------------------------- /fast_transformers/attention/causal_linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/causal_linear_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/clustered_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/clustered_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/conditional_full_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/conditional_full_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/exact_topk_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/exact_topk_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/full_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/full_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/improved_clustered_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/improved_clustered_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/improved_clustered_causal_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/improved_clustered_causal_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/linear_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/local_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/local_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention/reformer_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention/reformer_attention.py -------------------------------------------------------------------------------- /fast_transformers/attention_registry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention_registry/__init__.py -------------------------------------------------------------------------------- /fast_transformers/attention_registry/registry.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention_registry/registry.py -------------------------------------------------------------------------------- /fast_transformers/attention_registry/spec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/attention_registry/spec.py -------------------------------------------------------------------------------- /fast_transformers/builders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/builders/__init__.py -------------------------------------------------------------------------------- /fast_transformers/builders/attention_builders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/builders/attention_builders.py -------------------------------------------------------------------------------- /fast_transformers/builders/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/builders/base.py -------------------------------------------------------------------------------- /fast_transformers/builders/transformer_builders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/builders/transformer_builders.py -------------------------------------------------------------------------------- /fast_transformers/causal_product/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/causal_product/__init__.py -------------------------------------------------------------------------------- /fast_transformers/causal_product/causal_product_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/causal_product/causal_product_cpu.cpp -------------------------------------------------------------------------------- /fast_transformers/causal_product/causal_product_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/causal_product/causal_product_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/clustering/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fast_transformers/clustering/hamming/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/clustering/hamming/__init__.py -------------------------------------------------------------------------------- /fast_transformers/clustering/hamming/cluster_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/clustering/hamming/cluster_cpu.cpp -------------------------------------------------------------------------------- /fast_transformers/clustering/hamming/cluster_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/clustering/hamming/cluster_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/events/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/events/__init__.py -------------------------------------------------------------------------------- /fast_transformers/events/event.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/events/event.py -------------------------------------------------------------------------------- /fast_transformers/events/event_dispatcher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/events/event_dispatcher.py -------------------------------------------------------------------------------- /fast_transformers/events/filters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/events/filters.py -------------------------------------------------------------------------------- /fast_transformers/feature_maps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/feature_maps/__init__.py -------------------------------------------------------------------------------- /fast_transformers/feature_maps/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/feature_maps/base.py -------------------------------------------------------------------------------- /fast_transformers/feature_maps/fourier_features.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/feature_maps/fourier_features.py -------------------------------------------------------------------------------- /fast_transformers/hashing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/hashing/__init__.py -------------------------------------------------------------------------------- /fast_transformers/hashing/hash_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/hashing/hash_cpu.cpp -------------------------------------------------------------------------------- /fast_transformers/hashing/hash_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/hashing/hash_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/local_product/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/local_product/__init__.py -------------------------------------------------------------------------------- /fast_transformers/local_product/local_product_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/local_product/local_product_cpu.cpp -------------------------------------------------------------------------------- /fast_transformers/local_product/local_product_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/local_product/local_product_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/masking.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/masking.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/__init__.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/_utils.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/__init__.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/cross_attention/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/cross_attention/__init__.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/cross_attention/attention_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/cross_attention/attention_layer.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/cross_attention/full_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/cross_attention/full_attention.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/cross_attention/linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/cross_attention/linear_attention.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/self_attention/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/self_attention/__init__.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/self_attention/attention_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/self_attention/attention_layer.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/self_attention/full_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/self_attention/full_attention.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/attention/self_attention/linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/attention/self_attention/linear_attention.py -------------------------------------------------------------------------------- /fast_transformers/recurrent/transformers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/recurrent/transformers.py -------------------------------------------------------------------------------- /fast_transformers/sparse_product/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/sparse_product/__init__.py -------------------------------------------------------------------------------- /fast_transformers/sparse_product/clustered_sparse_product_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/sparse_product/clustered_sparse_product_cpu.cpp -------------------------------------------------------------------------------- /fast_transformers/sparse_product/clustered_sparse_product_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/sparse_product/clustered_sparse_product_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/sparse_product/sparse_product_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/sparse_product/sparse_product_cpu.cpp -------------------------------------------------------------------------------- /fast_transformers/sparse_product/sparse_product_cuda.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/sparse_product/sparse_product_cuda.cu -------------------------------------------------------------------------------- /fast_transformers/transformers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/transformers.py -------------------------------------------------------------------------------- /fast_transformers/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/utils.py -------------------------------------------------------------------------------- /fast_transformers/weight_mapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/fast_transformers/weight_mapper.py -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/mkdocs.yml -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/setup.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/__init__.py -------------------------------------------------------------------------------- /tests/aggregate/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/aggregate/__init__.py -------------------------------------------------------------------------------- /tests/aggregate/test_aggregate_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/aggregate/test_aggregate_cpu.py -------------------------------------------------------------------------------- /tests/aggregate/test_aggregate_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/aggregate/test_aggregate_gpu.py -------------------------------------------------------------------------------- /tests/aggregate/test_clustered_aggregate_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/aggregate/test_clustered_aggregate_cpu.py -------------------------------------------------------------------------------- /tests/aggregate/test_clustered_aggregate_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/aggregate/test_clustered_aggregate_gpu.py -------------------------------------------------------------------------------- /tests/aggregate/test_clustered_broadcast_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/aggregate/test_clustered_broadcast_cpu.py -------------------------------------------------------------------------------- /tests/aggregate/test_clustered_broadcast_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/aggregate/test_clustered_broadcast_gpu.py -------------------------------------------------------------------------------- /tests/attention/test_aft_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_aft_attention.py -------------------------------------------------------------------------------- /tests/attention/test_attention_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_attention_layer.py -------------------------------------------------------------------------------- /tests/attention/test_causal_linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_causal_linear_attention.py -------------------------------------------------------------------------------- /tests/attention/test_clustered_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_clustered_transformer.py -------------------------------------------------------------------------------- /tests/attention/test_clustered_transformer_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_clustered_transformer_gpu.py -------------------------------------------------------------------------------- /tests/attention/test_full_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_full_attention.py -------------------------------------------------------------------------------- /tests/attention/test_improved_clustered_transformer_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_improved_clustered_transformer_gpu.py -------------------------------------------------------------------------------- /tests/attention/test_linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_linear_attention.py -------------------------------------------------------------------------------- /tests/attention/test_local_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/attention/test_local_attention.py -------------------------------------------------------------------------------- /tests/causal_product/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/causal_product/__init__.py -------------------------------------------------------------------------------- /tests/causal_product/test_causal_product.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/causal_product/test_causal_product.py -------------------------------------------------------------------------------- /tests/causal_product/test_causal_product_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/causal_product/test_causal_product_cpu.py -------------------------------------------------------------------------------- /tests/causal_product/test_causal_product_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/causal_product/test_causal_product_gpu.py -------------------------------------------------------------------------------- /tests/clustering/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/clustering/__init__.py -------------------------------------------------------------------------------- /tests/clustering/hamming/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/clustering/hamming/__init__.py -------------------------------------------------------------------------------- /tests/clustering/hamming/test_cluster_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/clustering/hamming/test_cluster_cpu.py -------------------------------------------------------------------------------- /tests/clustering/hamming/test_cluster_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/clustering/hamming/test_cluster_gpu.py -------------------------------------------------------------------------------- /tests/clustering/hamming/test_python_api_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/clustering/hamming/test_python_api_gpu.py -------------------------------------------------------------------------------- /tests/clustering/hamming/time_python_api_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/clustering/hamming/time_python_api_gpu.py -------------------------------------------------------------------------------- /tests/events/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/events/__init__.py -------------------------------------------------------------------------------- /tests/events/test_event_dispatcher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/events/test_event_dispatcher.py -------------------------------------------------------------------------------- /tests/events/test_event_filters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/events/test_event_filters.py -------------------------------------------------------------------------------- /tests/events/test_events.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/events/test_events.py -------------------------------------------------------------------------------- /tests/feature_maps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/feature_maps/__init__.py -------------------------------------------------------------------------------- /tests/feature_maps/test_fourier_features.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/feature_maps/test_fourier_features.py -------------------------------------------------------------------------------- /tests/hashing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/hashing/__init__.py -------------------------------------------------------------------------------- /tests/hashing/test_hash_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/hashing/test_hash_cpu.py -------------------------------------------------------------------------------- /tests/hashing/test_hash_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/hashing/test_hash_gpu.py -------------------------------------------------------------------------------- /tests/local_product/test_local_product_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/local_product/test_local_product_cpu.py -------------------------------------------------------------------------------- /tests/local_product/test_local_product_cuda.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/local_product/test_local_product_cuda.py -------------------------------------------------------------------------------- /tests/recurrent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/__init__.py -------------------------------------------------------------------------------- /tests/recurrent/attention/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/attention/__init__.py -------------------------------------------------------------------------------- /tests/recurrent/attention/cross_attention/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/recurrent/attention/cross_attention/test_attention_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/attention/cross_attention/test_attention_layer.py -------------------------------------------------------------------------------- /tests/recurrent/attention/cross_attention/test_full_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/attention/cross_attention/test_full_attention.py -------------------------------------------------------------------------------- /tests/recurrent/attention/cross_attention/test_linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/attention/cross_attention/test_linear_attention.py -------------------------------------------------------------------------------- /tests/recurrent/attention/self_attention/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/recurrent/attention/self_attention/test_attention_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/attention/self_attention/test_attention_layer.py -------------------------------------------------------------------------------- /tests/recurrent/attention/self_attention/test_full_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/attention/self_attention/test_full_attention.py -------------------------------------------------------------------------------- /tests/recurrent/attention/self_attention/test_linear_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/attention/self_attention/test_linear_attention.py -------------------------------------------------------------------------------- /tests/recurrent/test_transformer_decoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/test_transformer_decoder.py -------------------------------------------------------------------------------- /tests/recurrent/test_transformer_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/recurrent/test_transformer_encoder.py -------------------------------------------------------------------------------- /tests/sparse_product/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/__init__.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_product_backward_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_product_backward_cpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_product_backward_cpu_v2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_product_backward_cpu_v2.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_product_backward_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_product_backward_gpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_product_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_product_cpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_product_cpu_v2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_product_cpu_v2.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_product_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_product_gpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_weighted_average_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_weighted_average_cpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_weighted_average_cpu_v2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_weighted_average_cpu_v2.py -------------------------------------------------------------------------------- /tests/sparse_product/test_clustered_sparse_weighted_average_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_clustered_sparse_weighted_average_gpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_sparse_product_backward_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_sparse_product_backward_cpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_sparse_product_backward_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_sparse_product_backward_gpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_sparse_product_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_sparse_product_cpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_sparse_product_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_sparse_product_gpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_sparse_weighted_average_cpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_sparse_weighted_average_cpu.py -------------------------------------------------------------------------------- /tests/sparse_product/test_sparse_weighted_average_gpu.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/sparse_product/test_sparse_weighted_average_gpu.py -------------------------------------------------------------------------------- /tests/test_builders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/test_builders.py -------------------------------------------------------------------------------- /tests/test_masking.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/test_masking.py -------------------------------------------------------------------------------- /tests/test_transformer_decoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/test_transformer_decoder.py -------------------------------------------------------------------------------- /tests/test_transformer_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/test_transformer_encoder.py -------------------------------------------------------------------------------- /tests/test_weight_mapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tests/test_weight_mapper.py -------------------------------------------------------------------------------- /tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idiap/fast-transformers/HEAD/tools.py --------------------------------------------------------------------------------