Using LLMs to generatively produce answers to cryptic crossword clues.
For further information on the use case motivation and methodology, please visit the following:
- For
main.part1.ipynb
: [Part 1] - For
main.part2.ipynb
: [Part 2: tbc]
If you are not using Colab, or prefer to create your own environment:
- You need to install the bleeding edge version of the
transformers
module to run the QA wrapper files (more information on installation options here):
! pip install git+https://github.com/huggingface/transformers
- Install the
requirements.txt
file
Otherwise, you can run the cells at the top of the notebook to install the dependencies on Colab.
This has been tested using Python >=3.10.
The trainer and wrapper python files are originally derived from the HuggingFace transformers examples page. An addition was made to the runfile to save predictions in a .json format - please compare files with the original commit if interested.
The clues dataset has been downloaded from this website: link. Please download and save into the ./data folder. I saved the filename as 'clues.csv'.
Editable parameters are kept in the parameters.py
file.
Colab may timeout prior to model training completing. Using this 'hack' you can keep the notebook alive. Note that also that using the free version of Colab puts a daily time limit per user to access to GPUs, so running for too many epochs may risk you running out of free resources.