原文
GPT-2 in pure CMake, executed with Q16.16 integer arithmetic.
mkdir -p checkpoint
curl -L -o checkpoint/model.safetensors https://huggingface.co/openai-community/gpt2/resolve/main/model.safetensors
curl -L -o checkpoint/vocab.json https://huggingface.co/openai-community/gpt2/resolve/main/vocab.json
curl -L -o checkpoint/merges.txt https://huggingface.co/openai-community/gpt2/resolve/main/merges.txt
python3 tools/gen_full.py
cmake -P gpt2_full.cmake -DPROMPT="Hello" -DN=2python3 tools/gen_tables.py
python3 tools/gen_model.py
cmake -P gpt2.cmakeBSD 3-Clause. See LICENSE.