Environment
Note: Because of recent pytorch change (>=1.7), it is not possible to run a QRNN layer without messing up the environment. See https://github.com/salesforce/pytorch-qrnn/issues/29 for details.
pip install -r requirements.txt
If you want to use a QRNN layer, please follow the instructions here to install python-qrnn first with downgraded torch <= 1.4.
Usage
Usage: run.py [OPTIONS]
Options:
--task [yelp2|yelp5|toxic] [default: yelp5]
--b INTEGER [default: 128]
--d INTEGER [default: 96]
--num_layers INTEGER [default: 2]
--batch_size INTEGER [default: 512]
--dropout FLOAT [default: 0.5]
--lr FLOAT [default: 0.001]
--nhead INTEGER [default: 4]
--rnn_type [LSTM|GRU|QRNN|Transformer]
[default: GRU]
--data_path TEXT
--help Show this message and exit.
Datasets
- yelp2(polarity): it will be downloaded w/ datasets(huggingface)
- yelp5: json file should be downloaded to into
data/ - toxic: dataset should be downloaded and unzipped to into
data/
Example: Yelp Polarity
python -W ignore run.py --task yelp2 --b 128 --d 64 --num_layers 4
Benchmarks(not optimized)
| Model | Model Size | Yelp Polarity (error rate) | Yelp-5 (accuracy) | Civil Comments (mean auroc) | Command |
|---|---|---|---|---|---|
--b 128 --d 64 --num_layers 4 --rnn_type QRNN |
|||||
| PRNN (this repo) | 90K | 5.5 | 70.7 | 95.57 | --b 128 --d 64 --num_layers 1 --rnn_type GRU |
| PTransformer (this repo) | 617K | 10.8 | 68 | 86.5 | --b 128 --d 64 --num_layers 1 --rnn_type Transformer --nhead 2 |
| PRADO1 | 175K | 65.9 | |||
| BERT | 335M | 1.81 | 70.58 | 98.8562 |
- Paper
- Best Kaggle Submission
Credits
Powered by pytorch-lightning and grid.ai
Metadata
Release files for pytorch-pqrnn 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytorch-pqrnn-0.1.0.tar.gz | 10.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytorch_pqrnn-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / pytorch-pqrnn-0.1.0.tar.gz
| Download URL | pytorch-pqrnn-0.1.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
484fa1849c8587c2f26152d71a5a238dd9056a489db01af4ecc0de5111ceebe6
|
|
BLAKE2b-256 checksum How to use checksums |
80424d4a27a9521ef143c4f2901b5845fa0a6a84496090797c957566e3255017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.8.5 Darwin/20.4.0
|
Release files / pytorch_pqrnn-0.1.0-py3-none-any.whl
| Download URL | pytorch_pqrnn-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38eec75dfbb827ec63e802f07d2fbd1a6e9f0e1e4780403449663151da5e746c
|
|
BLAKE2b-256 checksum How to use checksums |
cc4d1c35a0548fac31b40f490c4ef00488d3927eafbc31471d63808c11dff5e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.2 CPython/3.8.5 Darwin/20.4.0
|
Security for pytorch-pqrnn 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.