Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

Two-stage character-level next-character prediction system for multilingual text. Given a partial string, predicts the three most likely next characters (character autocomplete).

See [SPECIFICATION.md](SPECIFICATION.md) for the original [CSE 447 project](https://minneker.github.io/nlp-26wi/projects/447-project/) specification.
This implementation achieved **1st** out of **75 teams (211 participants)**, achieving a `0.9618` success rate and `167.2117` seconds runtime.

<p align="center">
<img src="graph.png" alt="Success Rate vs Runtime" />
</p>

See [SPECIFICATION.md](SPECIFICATION.md) for the original [CSE 447 project](https://minneker.github.io/nlp-26wi/projects/447-project/) specification. Also, the closely related [Interstellar Autocomplete Challenge](https://github.com/waterloo-nlp/intro-to-nlp-project).

**Stage 1 — KenLM**: An n-gram language model scores all vocabulary tokens and returns the top-K candidates.

Expand Down
6 changes: 4 additions & 2 deletions SPECIFICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,16 @@ For example, you may consider going to a new directory, unzipping your submissio
```
mkdir -p output
docker build -t cse447-proj/demo -f Dockerfile .
docker run --rm -v $PWD/src:/job/src -v $PWD/work:/job/work -v <path_to_test_data>:/job/data -v $PWD/output:/job/output cse447-proj/demo bash /job/src/predict.sh /job/data/input.txt /job/output/pred.txt
docker run --gpus all --rm -v $PWD/src:/job/src -v $PWD/work:/job/work -v <path_to_test_data>:/job/data -v $PWD/output:/job/output cse447-proj/demo bash /job/src/predict.sh /job/data/input.txt /job/output/pred.txt
```

If you are curious what these flags in `docker run` mean:

- `--gpus all` assign all available gpus to the container
- `--rm` remove container after running
- `-v a:b` mount `a` in host machine (e.g. path on your machine outside docker) to the container (e.g. path in the docker container).

If with the `--gpus all` flag your code throws an error that indicates that your submission is incompatible with gpu usage, we will retry without the `--gpus all` flag. This will not affect your runtime; we re-measure from the new docker run command.

Running this command will produce `output/pred.txt`, which we take to be your predictions on the heldout test data.
We will then evaluate your success rate against the heldout answer key using `grader/grade.py`.

Expand Down
Binary file added graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 0 additions & 158 deletions kenlm.md

This file was deleted.

Loading