Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/hf_ptq/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
compressed-tensors
fire
flash-attn>=2.6.0
psutil
transformers_stream_generator
zstandard
11 changes: 10 additions & 1 deletion examples/hf_ptq/scripts/huggingface_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,16 @@ if [[ $TASKS =~ "quant" ]] || [[ ! -d "$SAVE_PATH" ]] || [[ ! $(ls -A $SAVE_PATH
else
QUANT_SPEC_ARGS="--qformat=${QFORMAT// /,}"
fi
python hf_ptq.py \
# Opt-in memory/utilization sidecar: wraps the run and writes a CSV trace +
# peak summary under SAVE_PATH. Off by default (no behavior change).
MEM_MON_PREFIX=()
if [[ "${MEM_MONITOR:-0}" == "1" ]]; then
MEM_MON_PREFIX=(python scripts/mem_monitor.py \
--gpus "${CUDA_VISIBLE_DEVICES-all}" \
--out "$SAVE_PATH/mem_trace.csv" \
--summary "$SAVE_PATH/mem_peak.txt" --)
fi
"${MEM_MON_PREFIX[@]}" python hf_ptq.py \
--pyt_ckpt_path=$MODEL_PATH \
--export_path=$SAVE_PATH \
--sparsity_fmt=$SPARSITY_FMT \
Expand Down
Loading
Loading