Refer to the ParlayANN (https://github.com/cmuparlay/ParlayANN) implementation to create a HNSW.
git submodule init
git submodule update
mkdir -p data && cd data
wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz
tar -xf sift.tar.gz
mkdir build && cd build
cmake .. && make
cd algorithm/HNSW
./bench-hnsw -data_type float -dist_func l2 -base_file ../../../data/sift/sift_base.ifvecs