Practical overview
When it fits
Use it when you want a focused, locally run implementation for experimenting with End-to-End Memory Networks on the bAbI benchmark, rather than a general-purpose question-answering service.
Who it is for
- Developers and researchers exploring memory-network question answering.
- Learners who want to experiment with the End-to-End Memory Networks approach on bAbI tasks.
Documented uses
- Train and evaluate the model on a single bAbI task.
- Run the model across 20 bAbI tasks or train jointly on their training data.
- Use a pretrained model in a web or console question-answering demo.
Requirements & limits
The project is a public GitHub repository described as open source. The supplied repository metadata lists no license.
- The documented runtime is Python 2.7; the README lists Python 3 support as a future plan.
- The bAbI dataset must be placed at data/tasks_1-20_v1-2.
- NumPy is required, and Flask is needed for the web demo only.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Train or evaluate on bAbI tasks
Run the documented model runner for one task, all 20 tasks, or joint training across the 20 tasks.
Before you start
- Python 2.7
- NumPy
- The bAbI dataset downloaded to data/tasks_1-20_v1-2
Steps
Download and extract the bAbI dataset into data/tasks_1-20_v1-2.
For one task, run the command below, replacing 1 with the desired task ID.
python babi_runner.py -t 1For runs across 20 tasks, use the command below; for joint training on all 20 tasks' training data, use the command below.
python babi_runner.py -apython babi_runner.py -j
Expected outcome
The runner trains and evaluates on the selected task or task set and reports training and validation error.
Guide limitations
- The README specifies Python 2.7.
- The documented dataset location is data/tasks_1-20_v1-2.
Prepare and launch the question-answering demo
Create the documented pretrained model file and start the web or console demo.
Before you start
- Python 2.7
- NumPy
- The bAbI dataset in data/tasks_1-20_v1-2
- Flask for the web-based demo
Steps
Create the pretrained model with the command below.
python -m demo.qa -trainStart the web demo with the command below, or start the console demo with the command below.
python -m demo.qapython -m demo.qa -console
Expected outcome
The demo provides a documented web-based or console interface for asking questions with the model.
Guide limitations
- Flask is listed as a requirement only for the web-based demo.
- The README documents Python 2.7 and does not list Python 3 support.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 8 November 2026
- Original website title
- vinhkhuc/MemN2N-babi-python · Official homepage title · retained in its source language

