Discover and explore top open-source AI tools and projects—updated daily.
PyTorch toolkit for sequence-to-sequence and other NLP tasks
Top 30.7% on SourcePulse
This repository provides a lightweight PyTorch framework for various Natural Language Processing (NLP) tasks, leveraging BERT and similar models. It targets researchers and developers needing a flexible tool for sequence-to-sequence generation (e.g., poetry, summarization), text classification, and sequence labeling (e.g., NER, POS tagging), with support for multiple pre-trained models like BERT, RoBERTa, GPT2, T5, and BART.
How It Works
The framework utilizes a unified approach where different NLP tasks are handled by configuring model architecture and task-specific heads on top of pre-trained encoder models. It supports various pre-trained models by loading their parameters, allowing users to switch between them by setting model_name
. Task selection is managed via the model_class
parameter, enabling tasks like seq2seq
, cls_classifier
, sequence_labeling
, and sequence_labeling_crf
. This modular design simplifies experimentation with different models and tasks.
Quick Start & Requirements
pip install bert-seq2seq tqdm
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
3 years ago
1 day