31 lines
1.1 KiB
Bash
Executable file
31 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
set -eu
|
|
|
|
if [ "$#" -ne 3 ]; then
|
|
echo "usage: $0 ANALYZER FULL_MODEL_FIXTURE OPERATOR_FIXTURE" >&2
|
|
exit 2
|
|
fi
|
|
|
|
analyzer=$1
|
|
full_model=$2
|
|
operator=$3
|
|
report=$(mktemp /private/tmp/gem-decode-residual-report.XXXXXX)
|
|
mismatch=$(mktemp /private/tmp/gem-decode-residual-mismatch.XXXXXX)
|
|
trap 'rm -f "$report" "$mismatch"' EXIT INT TERM HUP
|
|
|
|
"$analyzer" "$full_model" "$operator" "$report"
|
|
jq -e '
|
|
.position == 65536 and .full_attention_layers == 10 and
|
|
.model_attention_kernel == "dim32" and .operator_value_kernel == "dim32" and
|
|
.residual.theoretical_whole_token_value_ceiling_pct > 34 and
|
|
.residual.theoretical_whole_token_value_ceiling_pct < 36 and
|
|
.residual.value_gain_required_for_3pct_whole_token_pct > 8 and
|
|
.residual.value_gain_required_for_3pct_whole_token_pct < 9 and
|
|
.screening.admissible == true and .screening.promotion_eligible == false
|
|
' "$report" >/dev/null
|
|
|
|
jq '.tokens = 65535 | .live_tokens = 65535' "$operator" > "$mismatch"
|
|
if "$analyzer" "$full_model" "$mismatch" "$report" >/dev/null 2>&1; then
|
|
echo "mismatched populated position was accepted" >&2
|
|
exit 1
|
|
fi
|