#111 · Primary category: NLP Tools & Text Processing

bi-att-flow

bidaf nlp question-answering squad tensorflow

Bi-directional Attention Flow (BiDAF) network is a multi-stage hierarchical process that represents context at different levels of granularity and uses a bi-directional attention flow mechanism to achieve a query-aware context representation without early summarization.

Project last updated:05/31/23

GitHub Stars

1.5K

Forks

667

Contributors

4

License

Apache-2.0

Why we included this project

Anyone reproducing or building on the 2017 SQuAD leaderboard results will want to start here: this is the original reference implementation of BiDAF, the architecture that introduced bidirectional attention flow for machine comprehension. The code covers the whole pipeline, from downloading and preprocessing SQuAD with GloVe through training the roughly 2.5M parameter model on a Titan X and scoring it with the official evaluator. Pretrained weights and single and ensemble run scripts are included, so you can reproduce the published test-set EM and F1 scores and verify your environment before changing anything. Just note that the code targets TensorFlow r0.11 and Python 3.5, so treat it as a study and reproduction resource rather than production software; the clear layer-by-layer structure makes it easy to read, ablate, or extend. It is also a good place to trace how the query-to-context and context-to-query attention halves are wired, which helps when porting classic attention architectures to newer frameworks.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category