MOSS-Image-SFT-OpenVINO / code /chain_int8.sh
aqualaguna's picture
Add files using upload-large-folder tool
565b868 verified
Raw History Blame Contribute Delete
545 Bytes
#!/bin/bash
# Build the shipped sft-int8 DiT: NNCF INT8_ASYM per-channel weights, every ffn_down projection kept in fp16 -> models/dit_sft_int8_keepdown (CPU only, serial on purpose).
# The fp16 text encoder is shared with `sft`; an int8 text encoder was measured and is not offered (te_int8: lossy on long prompts).
PY=/opt/mossimage/venv/bin/python
cd ${CODE_DIR:-/opt/mossimage/code_u1}
M=/opt/mossimage/models
$PY -u int8_compress.py $M/dit_sft $M/dit_sft_int8_keepdown --mode INT8_ASYM --keep-down || exit 1
ls -la $M/dit_sft_int8_keepdown