tensorops / transformerx Goto Github PK
View Code? Open in Web Editor NEWFlexible Python library providing building blocks (layers) for reproducible Transformers research (Tensorflow โ , Pytorch ๐, and Jax ๐)
License: MIT License
Flexible Python library providing building blocks (layers) for reproducible Transformers research (Tensorflow โ , Pytorch ๐, and Jax ๐)
License: MIT License
A list of new embedding layers to be added
To contribute, please:
When running running test_main
module, I encountered this error:
test_main.py:42: in <module> encoder_blk = TransformerEncoderBlock(24, 24, 24, 24, norm_shape, 48, 8, 0.5) E TypeError: TransformerEncoderBlock.__init__() takes from 6 to 7 positional arguments but 9 were given
It seems invalid and needs to be fixed.
The JAX in the roadmap is written as JAZ!
Update the docstrings of the newly refactored TransformerEncoder
Unit tests and Integration tests
Update the documentation for the transformer decoder block
Add the capability to support distributed computation
Add support for quantization techniques:
add support for different initializers, regularizers, and learnable scaling weights
Make the TransformerEncoderBlock layer more flexible and performant.
Add details to the documentation
Separate the masked_softmax and sequence_mask functions. Also add support for calibration using temperature scaling
Add more details to the documentation
Description: We need to implement several new attention masking layers in our model to improve its performance on specific tasks. The following masking layers need to be implemented:
It is important to carefully consider the design and implementation of these masking layers to ensure they are effective and efficient.
Deadline for each layer: 2 weeks after opening the issue. After the deadline, the issue opened will be closed to make it available for other contributors.
Write the tests for the newly refactored layer mentioned in #99
Refactor the structure of the project to a standard library
Positional encoding test cases
Most of the base classes in layers
package have a method like def call(self, X, state, **kwargs):
. These classes are designed to be callable, However, this syntax is incorrect and needs to be fixed.
Document the layers API
For contributing, please:
The License name should be modified so that the license should be derived from the project instead of manually.
To directly import the modules and objects from the packages, they must be imported in the packages' init.py first.
The current PositionWiseFFN class is a simple implementation of a feed-forward neural network that operates on the feature dimension of the input tensor. Here are other more advanced options and features to improve or modify the implementation:
Test cases for the following layers:
For contributing to the project, please follow these steps:
The sin and cos functions are being called from both numpy and tensorflow. This can cause errors if the types are not properly converted between the two libraries. In this case, it's better to just use the tf.sin and tf.cos functions. Also, less conversion leads to less time and space complexity.
The P matrix is created using numpy and then converted to a tensorflow tensor using tf.convert_to_tensor. This is unnecessary, as the P matrix can be created directly as a tensorflow tensor using tf.sin and tf.cos.
The tf.keras.layers.Dropout layer is used to apply dropout to the entire X tensor, including the positional encoding. This is not ideal, as the positional encoding is meant to be fixed and not subject to dropout. Instead, the dropout layer should be applied only to the input features.
Test cases for this layer.
Check if the input data is appropriate
Add more details to the documentation.
Refactor the whole decoder block and add advanced features and make it more flexible
Handle the inputs and raise issues in case inappropriate was data provided.
For contributing, please:
A list of new embedding layers to be added
To contribute, please:
Open convert to issue
Update the TransformerEncoder layer and adapt it to the newly refactored sublayers.
A list of new embedding layers to be added
To contribute, please:
Open convert to issue
Embedding:
Positional embedding:
Please refer to the following useful links:
A list of new attention layers to be added
You can pick any of the following frameworks and implement your layers:
To contribute, please:
Open convert to issue
Please note that we use Numpy style for the docstrings and provide examples as much as possible!
Also please try to provide unit tests using Pytest
Whenever you need help with implementation or any other related issues you might be dealing with, please reach out to me via discussions or Discord server community @soran-ghaderi or @sigma1326
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.