Add learnable last-four-layer query fusion

This commit is contained in:
Xin Wang
2026-08-26 10:29:43 +08:00
parent dbef1fc173
commit 43e0e14cf5
7 changed files with 268 additions and 37 deletions
+3
View File
@@ -17,6 +17,7 @@ MEMORY_SECONDS="${MEMORY_SECONDS:-20}"
NATIVE_BLOCK_SECONDS="${NATIVE_BLOCK_SECONDS:-2}"
VIDEO_FPS="${VIDEO_FPS:-2}"
READOUT_LAST_N_LAYERS="${READOUT_LAST_N_LAYERS:-1}"
READOUT_LAYER_FUSION="${READOUT_LAYER_FUSION:-mean}"
MODE="${MODE:-open-stream-replay}"
DTYPE="${DTYPE:-bfloat16}"
DECODER="${DECODER:-decord}"
@@ -74,6 +75,7 @@ run_one() {
echo "output=${output}"
echo "memory_seconds=${MEMORY_SECONDS} video_fps=${VIDEO_FPS} mode=${MODE}"
echo "readout_last_n_layers=${READOUT_LAST_N_LAYERS}"
echo "readout_layer_fusion=${READOUT_LAYER_FUSION}"
echo "decoder=${DECODER} decoder_gpu_id=${DECODER_GPU_ID} frame_cache_size=${FRAME_CACHE_SIZE}"
if ! CUDA_VISIBLE_DEVICES="${gpu}" PYTHONUNBUFFERED=1 \
@@ -87,6 +89,7 @@ run_one() {
--native-block-seconds "${NATIVE_BLOCK_SECONDS}" \
--video-fps "${VIDEO_FPS}" \
--readout-last-n-layers "${READOUT_LAST_N_LAYERS}" \
--readout-layer-fusion "${READOUT_LAYER_FUSION}" \
--frame-cache-size "${FRAME_CACHE_SIZE}" \
--decoder "${DECODER}" \
--decoder-gpu-id "${DECODER_GPU_ID}" \