This code is provided for replication of the results provided in "Automated Math Word Problem solving and quantity identification using Large Language Models for code synthesis"
The code is provided as-is. We take no responsability in any damages that it might produce on your system. The scripts have been lightly edited to remove absolute paths from our computers, it is possible that you have to modify routes to make all the scripts work appropiately.
- python 3.10
- virtual environment with the requirements.txt installed
In order to obtain the generated samples you must run the script inference.py
. This script takes 4 parameters that must be defined in order to produce the desired output:
model
: The model to run, a valid huggingface model identificatortemperature
: any floating point0<X<1
batch_size
: any number greater than 1. Used to determine the batch size for inference. Heavy dependant on available memorydataset_name
: etiher GSM-8K or SVAMP
In order to run the evaluation of the generated samples, you must first to the single_file format, this is done in order to speed up the evaluation of the later scripts by reducing IO.
To do so run the single_file.py
script.
Once that it is done, you can run voting.py
or evaluate.py
in order to obtain the evaluation results of the generated code samples.