16.9 MB
16 files
Updated 2 days ago
NameSize
README.md783 Bytes
xet
config_671B_v3.2.json605 Bytes
xet
convert.py3.97 kB
xet
dist_writer.py9.51 kB
xet
generate.py8.1 kB
xet
model_v32.py39.5 kB
xet
requirements.txt83 Bytes
xet
tilelang_kernel.py9.96 kB
xet
README.md

Inference code for DeepSeek models

First convert huggingface model weight files to the format of this project.

python convert.py --hf-ckpt-path ${HF_CKPT_PATH} --save-path ${SAVE_PATH} --n-experts ${EXPERTS} --model-parallel ${MP}

Then chat with DeepSeek model at will!

torchrun --nproc-per-node ${MP} generate.py --ckpt-path ${SAVE_PATH} --config ${CONFIG} --interactive --temperature {T}

Or batch inference from file.

torchrun --nproc-per-node ${MP} generate.py --ckpt-path ${SAVE_PATH} --config ${CONFIG} --input-file ${FILE}

Or multi nodes inference.

torchrun --nnodes ${NODES} --nproc-per-node $((MP / NODES)) --node-rank $RANK --master-addr $ADDR generate.py --ckpt-path ${SAVE_PATH} --config ${CONFIG} --input-file ${FILE}
Total size
16.9 MB
Files
16
Last updated
May 25
Pre-warmed CDN
US EU US EU

Contributors