DrQA¶
This agent is a (partial) implementation of the DrQA Document Reader from:
Danqi Chen, Adam Fisch, Jason Weston, Antoine Bordes. 2017. Reading Wikipedia to Answer Open-Domain Questions. In Association for Computational Linguistics (ACL).
Read more about DrQA here.
Basic Examples¶
Train a DrQA model on SQuAD.
python projects/drqa/train.py
Evaluate a pre-trained model on SQuAD.
python projects/drqa/eval_pretrained.py
DictionaryAgent Options¶
BPEHelper Arguments
Argument |
Description |
---|---|
|
Path to pre-trained tokenizer vocab |
|
Path to pre-trained tokenizer merge |
|
Use BPE dropout during training. |
DrqaAgent Options¶
DrQA Arguments
Argument |
Description |
---|---|
|
Default: |
|
Default: |
|
Default: |
|
File of space separated embeddings: w e1 … ed |
|
Load dict/features/weights/opts from this file |
|
|
|
Default: |
|
Train the K most frequent word embeddings |
|
Default embedding size if embedding_file is not given |
|
Hidden size of RNN units |
|
Number of RNN layers for passage |
|
Number of RNN layers for question |
|
RNN type: lstm (default), gru, or rnn |
|
Metric for choosing best valid model |
|
The max span allowed during decoding |
|
Default: |
|
Print train error after every<display_iter> epoches (default 10) |
|
Dropout rate for word embeddings |
|
Dropout rate for RNN states |
|
Whether to dropout the RNN output |
|
Optimizer: sgd or adamax (default) |
|
Learning rate for SGD (default 0.1) |
|
Gradient clipping (default 10.0) |
|
Weight decay (default 0) |
|
Momentum (default 0) |
|
When given paragraphs (separated by |
|
Default: |
|
The way of computing question representation |
|
Whether to use weighted question embeddings |
|
Whether to use in_question features |
|
Whether to use tf features |
|
Time features marking how recent word was said |
BPEHelper Arguments
Argument |
Description |
---|---|
|
Path to pre-trained tokenizer vocab |
|
Path to pre-trained tokenizer merge |
|
Use BPE dropout during training. |
|
Use only words found in provided embedding_file |
SimpleDictionaryAgent Options¶
BPEHelper Arguments
Argument |
Description |
---|---|
|
Path to pre-trained tokenizer vocab |
|
Path to pre-trained tokenizer merge |
|
Use BPE dropout during training. |
|
Use only words found in provided embedding_file |