https://github.com/prajjwal1/fluence
A deep learning library based on Pytorch focussed on low resource language research and robustness
https://github.com/prajjwal1/fluence
attention deep-learning nlp pytorch transformers
Last synced: about 1 year ago
JSON representation
A deep learning library based on Pytorch focussed on low resource language research and robustness
- Host: GitHub
- URL: https://github.com/prajjwal1/fluence
- Owner: prajjwal1
- License: apache-2.0
- Created: 2020-02-18T03:52:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-30T22:45:01.000Z (over 4 years ago)
- Last Synced: 2025-05-18T22:13:06.351Z (about 1 year ago)
- Topics: attention, deep-learning, nlp, pytorch, transformers
- Language: Python
- Homepage:
- Size: 3.12 MB
- Stars: 70
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Winner of Pytorch Global Hackathon 2020.
Fluence is a Pytorch based deep learning library focussed on providing computationally efficient, low resource methods and algorithms for NLP. Although the main focus is to provide support with transformers for NLP tasks, it can be extended with other domains and architectures as well. Currently in pre-alpha stage.
List of implemented papers
#### Adaptive Methods
- [Adaptive Attention Span in Transformers (ACL 2019)](https://arxiv.org/abs/1905.07799)
- [Adaptively Sparse Transformers (EMNLP 2019)](https://arxiv.org/abs/1909.00015)
- [Reducing Transformer Depth on Demand with Structured Dropout (ICLR 2020)](https://arxiv.org/abs/1909.11556)
#### Debiasing
- [Learning Robust Representations by Projecting Superficial Statistics Out (ICLR 2019)](https://openreview.net/pdf?id=rJEjjoR9K7)
-------------------------------------------------------------------------------
- [Installation](#installing)
- [Overview](#overview)
## Why Fluence ?
Fluence is targeted towards two main goals:
1. **Compute efficiency**: Low resource research:
2. **Robustness**: Algorithms that either enhance our understanding of current methods or show where SoTA methods fail.
It is as straightforward to use as [HF Transformers](https://github.com/huggingface/transformers), and fully integrates with [Pytorch](https://github.com/pytorch/pytorch). Please note that the current modules (meta-trainer, siamese-trainer) which rely on inherited `Trainer` works with `transformers==3.0`. Newer version comes with a modified `Trainer`.
## Installing
For stable version:
```bash
pip3 install --user fluence
```
For development version (recommended):
```bash
git clone https://github.com/prajjwal1/fluence
cd fluence
python3 setup.py install --user
```
## Overview
The library contains implementation for the following approaches (many more to come):
| Module | Method with documentation
| -------------------------------------------------------------------------------------- | ----------------------------
| `fluence.adaptive` | [Adaptive Methods](https://github.com/prajjwal1/fluence/wiki/Adaptive-Methods) |
| `fluence.datasets` | [Datasets](https://github.com/prajjwal1/fluence/wiki/datasets) |
| `fluence.optim` | [Optimizers](https://github.com/prajjwal1/fluence/wiki/Optimizers) |
| `fluence.sampling` | [Importance Sampling](https://github.com/prajjwal1/fluence/wiki/Importance-sampling) |
| `fluence.models` | [Siamese Methodology](https://github.com/prajjwal1/fluence/wiki/Siamese-Transformers), [Debiasing](https://github.com/prajjwal1/fluence/wiki/Debiasing)
| `fluence.prune` | [Pruning](https://github.com/prajjwal1/fluence/wiki/Pruning)|
## Documentation
Please head to this [link](https://github.com/prajjwal1/fluence/wiki) to learn how you can integrate `fluence` with your workflow. Since it's an early release, there might be bugs. Please file an issue if you encounter one. Docs are a work-in-progress.
### Contribution
You can contribute by either filing an issue or sending a Pull Request (if you encounter any bug or want some features to be added). Please checkout the [contributing guide](https://github.com/prajjwal1/fluence/blob/master/CONTRIBUTING.md) for more details.
### Tests
Fluence comes with an [extensive test suite](https://github.com/prajjwal1/fluence/tree/master/tests) for high test coverage.
```
pytest tests/ -v
```
Author: Prajjwal Bhargava ([@prajjwal_1](https://twitter.com/prajjwal_1))