###################################################################
YOU MUST TOKENIZE INPUTS BEFORE RUNNING INFERENCE YOU MUST HAVE GPT2-124M DOWNLOADED
###################################################################
This should already be included, but in the case it is not provided download it again using
python3 -m venv venvsource ./venv/bin/activatepip install -r requirements.txtpython3 src/serialize_model.py
make- make everythingmake serial- serial onlymake mpi- serial + mpimake cuda- cuda onlymake mpi_cuda- cuda + mpimake clean- clear directory
- Generate input from text file using python tokenizer.
- Run inference program.
python3 src/tokenizer.py "$(cat 1.txt)"python3 src/tokenizer.py "$(cat 2.txt)"python3 src/tokenizer.py "$(cat 3.txt)"
This loads ./work/tokens.bin which all inference code uses
Or you can specify an alternate output file as a second argument:
python3 src/tokenizer.py "Your text here" ./work/your_tokens.bin
If you do this, be sure then then you can pass this file to the inference programs as a second argument. Else it will default to ./work/tokens.bin
Example: ./work/serial_attention ./work/your_tokens.bin
./work/serial_attention
mpirun --hostfile hostfile.2 -n 2 ./work/mpi_attentionmpirun --hostfile hostfile.4 -n 4 ./work/mpi_attentionmpirun --hostfile hostfile.8 -n 8 ./work/mpi_attention
./work/cuda_attention
mpirun --hostfile hostfile.2 -n 2 ./work/mpi_cuda_attentionmpirun --hostfile hostfile.4 -n 4 ./work/mpi_cuda_attentionmpirun --hostfile hostfile.8 -n 8 ./work/mpi_cuda_attention