Skip to content
Merged
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
36 changes: 20 additions & 16 deletions .ci/scripts/test_lora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ fi
# Confirm file sizes.
FOUNDATION_SIZE=$(stat -c%s qwen_foundation.ptd)
if [[ $FOUNDATION_SIZE -le "2400000000" ]]; then
echo "qwen_foundation_q.ptd size is: $FOUNDATION_SIZE"
echo "qwen_foundation_q.ptd size is: $FOUNDATION_SIZE"
else
echo "qwen_foundation_q.ptd size: $FOUNDATION_SIZE is greater than threshold 2.4GB"
cleanup_files
exit 1
echo "qwen_foundation_q.ptd size: $FOUNDATION_SIZE is greater than threshold 2.4GB"
cleanup_files
exit 1
fi

### QUANTIZATION & PROGRAM DATA SEPARATION ###
Expand Down Expand Up @@ -161,15 +161,19 @@ $PYTHON_EXECUTABLE -m extension.llm.export.export_llm \
+quantization.qmode="8da4w" \
+quantization.group_size=32

# Confirm that qwen_foundation_lora_q.ptd and qwen_foundation_q.ptd are the same.
if diff -q qwen_foundation_lora_q.ptd qwen_foundation_q.ptd > /dev/null; then
echo "qwen_foundation_lora_q.ptd and qwen_foundation_q.ptd are identical."
# Confirm that qwen_foundation_lora_q.ptd and qwen_foundation_q.ptd are the same size.
# TODO(lfq): confirm they are the same (deserialize and check fields)
size1=$(stat -c%s qwen_foundation_lora_q.ptd)
size2=$(stat -c%s qwen_foundation_q.ptd)

if [ "$size1" -eq "$size2" ]; then
echo "qwen_foundation_lora_q.ptd and qwen_foundation_q.ptd are the same size: $size1."
else
echo "qwen_foundation_lora_q.ptd and qwen_foundation_q.ptd are not identical."
ls -la qwen_foundation_lora_q.ptd
ls -la qwen_foundation_q.ptd
cleanup_files
exit 1
echo "qwen_foundation_lora_q.ptd and qwen_foundation_q.ptd have different sizes."
ls -la qwen_foundation_lora_q.ptd
ls -la qwen_foundation_q.ptd
cleanup_files
exit 1
fi

# Run quantized qwen model (no adapter).
Expand Down Expand Up @@ -216,11 +220,11 @@ fi
# Confirm qwen_foundation_q.ptd file size.
FOUNDATION_Q_SIZE=$(stat -c%s qwen_foundation_q.ptd)
if [[ $FOUNDATION_Q_SIZE -le "1000000000" ]]; then
echo "qwen_foundation_q.ptd size is: $FOUNDATION_Q_SIZE"
echo "qwen_foundation_q.ptd size is: $FOUNDATION_Q_SIZE"
else
echo "qwen_foundation_q.ptd size: $FOUNDATION_Q_SIZE is greater than threshold 1GB"
cleanup_files
exit 1
echo "qwen_foundation_q.ptd size: $FOUNDATION_Q_SIZE is greater than threshold 1GB"
cleanup_files
exit 1
fi

cleanup_files
Loading