{"id":15683403,"url":"https://github.com/ivanbongiorni/maximal","last_synced_at":"2025-05-07T13:00:24.363Z","repository":{"id":59927668,"uuid":"539191735","full_name":"IvanBongiorni/maximal","owner":"IvanBongiorni","description":"A TensorFlow-compatible Python library that provides models and layers to implement custom Transformer neural networks. Built on TensorFlow 2.","archived":false,"fork":false,"pushed_at":"2023-10-29T14:13:10.000Z","size":406,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T05:04:34.538Z","etag":null,"topics":["attention-is-all-you-need","attention-mechanism","deep-learning","keras","machine-learning","natural-language-generation","natural-language-processing","natural-language-understanding","neural-network","nlp","tensorflow","tensorflow2","transformer","transformers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IvanBongiorni.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-20T21:04:51.000Z","updated_at":"2023-12-18T06:58:09.000Z","dependencies_parsed_at":"2023-02-18T20:15:34.096Z","dependency_job_id":"9d5296a0-d95e-4eed-9208-3c709ec35c9b","html_url":"https://github.com/IvanBongiorni/maximal","commit_stats":{"total_commits":69,"total_committers":1,"mean_commits":69.0,"dds":0.0,"last_synced_commit":"26db3088d69dcc2914e27fa82a1351143fe67764"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2Fmaximal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2Fmaximal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2Fmaximal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2Fmaximal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IvanBongiorni","download_url":"https://codeload.github.com/IvanBongiorni/maximal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883219,"owners_count":21819157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attention-is-all-you-need","attention-mechanism","deep-learning","keras","machine-learning","natural-language-generation","natural-language-processing","natural-language-understanding","neural-network","nlp","tensorflow","tensorflow2","transformer","transformers"],"created_at":"2024-10-03T17:05:02.460Z","updated_at":"2025-05-07T13:00:24.325Z","avatar_url":"https://github.com/IvanBongiorni.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# maximal\n\nSee the [Official Documentation site](https://ivanbongiorni.github.io/maximal/)\n\nCurrent version: **1.2.1**\n\nA TensorFlow-compatible Python library that provides models and layers to implement custom Transformer neural networks.\n\nBuilt on TensorFlow 2.\n\n\u003ca href=\"url\"\u003e\u003cimg src=\"https://github.com/IvanBongiorni/maximal/blob/main/utils/maximal_stablediffusion_00.png\" align=\"center\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n*Logo generated by Stable Diffusion 2.1*\n\u003cbr\u003e\n\n# Installation\nIts installation is straightforward:\n\n```\npip install maximal\n```\n\n# How to use it?\n`maximal` is commonly called as:\n\n```\nimport maximal as ml\nfrom maximal.layers import TransformerLayer, GPTLayer\n```\n\nand can be used in a `tf.keras` model as any common layer.\n\n\n# Documentation\nAn [Official Website](https://ivanbongiorni.github.io/maximal/) is now available with documentation and tutorials.\n\nPyPI link is available [here](https://pypi.org/project/maximal/1.0/.\n\n\n# Elements\n\nIn `layers.py`:\n- `SelfAttention`: `keras.Layer`, computes *Scaled Dot-Product Attention*.\n\n- `MultiHeadSelfAttention`: `keras.Layer`, it is a concatenation of `SelfAttention` layers, resized back to original input shape through linear transformation.\n\n- `PositionalEmbedding`: `keras.Layer`, implements double Embedding layers used in Transformers literature, for tokens and positions. Positional encoding is learned through a `tf.keras.layers.Embedding()` layer, instead of deterministic positional encoding in the original paper.\n\n- `ImageEmbedding`: `keras.Layer`, implements double Embedding layers used as inputs of Vision Transformers, for image patches and positions.\n\n- `TransformerLayer`: `keras.Layer` single Transformer Encoder piece. It can be used inside any `Sequential()` model in Keras.\n\n- `GPTLayer`: `keras.Layer` GPT block. Similar to `TransformerLayer` but with causal Attention mechanism. It can be used inside any `Sequential()` model in Keras.\n\nComing soon: `models.py`.\n\n# Requirements\n```\nh5py\nnumpy\ntensorflow \u003e= 2.0\n```\n\n# Author\nIvan Bongiorni. [LinkedIn](https://www.linkedin.com/in/ivan-bongiorni-b8a583164/)\n\n# License\n2020 Ivan Bongiorni\n\nThis repository is licensed under the MIT license. See [LICENCE.txt]() for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanbongiorni%2Fmaximal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanbongiorni%2Fmaximal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanbongiorni%2Fmaximal/lists"}