fastNLP/reproduction/Star_transformer
yh_cc 17b5fd0066 1. 删除Trainer中对train_data必须为DataSet的assert
2. 删除Trainer的prefetch参数; 在注释中增加num_workers参数
3. Trainer中默认sampler为RandomSampler
2019-06-15 13:10:28 +08:00
..
datasets.py Dev0.4.0 (#149) 2019-05-22 18:43:56 +08:00
modules.py Dev0.4.0 (#149) 2019-05-22 18:43:56 +08:00
README.md update reproduction/README.md 2019-06-05 16:07:56 +08:00
run.sh Dev0.4.0 (#149) 2019-05-22 18:43:56 +08:00
train.py 1. 删除Trainer中对train_data必须为DataSet的assert 2019-06-15 13:10:28 +08:00
util.py Dev0.4.0 (#149) 2019-05-22 18:43:56 +08:00

Star-Transformer

paper: Star-Transformer

Performance (still in progress)

任务 数据集 SOTA 模型表现
Pos Tagging CTB 9.0 - ACC 92.31
Pos Tagging CONLL 2012 - ACC 96.51
Named Entity Recognition CONLL 2012 - F1 85.66
Text Classification SST - 49.18
Natural Language Inference SNLI - 83.76

Usage

# for sequence labeling(ner, pos tagging, etc)
from fastNLP.models.star_transformer import STSeqLabel
model = STSeqLabel(
    vocab_size=10000, num_cls=50,
    emb_dim=300)


# for sequence classification
from fastNLP.models.star_transformer import STSeqCls
model = STSeqCls(
    vocab_size=10000, num_cls=50,
    emb_dim=300)


# for natural language inference
from fastNLP.models.star_transformer import STNLICls
model = STNLICls(
    vocab_size=10000, num_cls=50,
    emb_dim=300)