kalpesh77's picture
|
download
raw
783 Bytes

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}

Xet Storage Details

Size:
783 Bytes
·
Xet hash:
23ac68037407f9692750008cfc6f4dc2b88d1456aff78bb33499a54e4e2b2d8d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.