lvsa-reproduce-paper
Automates the reproduction of LVSA paper benchmark results and performance evaluations.
Install
mkdir -p .claude/skills/lvsa-reproduce-paper && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16028" && unzip -o skill.zip -d .claude/skills/lvsa-reproduce-paper && rm skill.zipInstalls to .claude/skills/lvsa-reproduce-paper
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Reproduce LVSA paper headline numbers using the bundled benchmarks/ scripts. Use when running the SotA comparison (5 prompts × 3 horizons × 4 methods), the latency-scaling sweep, scoring videos with VQeval + VBench-Long, or regenerating the figures embedded in the README.Key capabilities
- →Install LVSA and scoring dependencies.
- →Generate videos for SotA comparison across methods and horizons.
- →Run latency scaling sweeps.
- →Score generated videos using VQeval.
- →Score generated videos using VBench-Long.
- →Aggregate scoring results and generate figures.
How it works
The skill provides scripts to set up the environment, generate videos with different methods and frame counts, and then score these videos using VQeval and VBench-Long. It then aggregates the results and generates figures.
Inputs & outputs
When to use lvsa-reproduce-paper
- →Running SotA comparison
- →Latency-scaling sweeps
- →Scoring videos with VQeval
- →Regenerating paper figures
About this skill
Reproducing LVSA paper numbers
Setup
git clone https://github.com/JiusiServe/LongVideoSparseAttention
cd LVSA
uv venv --python 3.12
source .venv/bin/activate
# Install LVSA + scoring deps
uv pip install -e ".[diffusers,hunyuan,flashinfer,dev]"
uv pip install -e vqeval/
# For VBench-Long, you need a separate venv (it pins old diffusers/transformers)
git clone https://github.com/Vchitect/VBench /path/to/VBench
python3 -m venv /path/to/vbench-venv
source /path/to/vbench-venv/bin/activate
pip install -e /path/to/VBench
deactivate
source .venv/bin/activate # back to LVSA venv
# Model weights (downloaded separately)
# Wan 2.1 1.3B: huggingface-cli download Wan-AI/Wan2.1-T2V-1.3B-Diffusers
export MODEL_PATH=/path/to/Wan2.1-T2V-1.3B-Diffusers
SotA grid (5 prompts × 3 horizons × 4 methods)
Generate 60 videos: Dense / RIFLEx / LVSA-SDPA / LVSA-FI × 165/249/333 frames × 5 prompts.
export OUTDIR=out/sota_comparison
bash benchmarks/sota_comparison.sh
Expected wall time per cell (single A100, 50 steps, seed 16):
| Method | 2× (165f) | 3× (249f) | 4× (333f) |
|---|---|---|---|
| Dense | 566 s | 1145 s | 1930 s |
| RIFLEx | 564 s | 1149 s | 1931 s |
| LVSA (SDPA) | 502 s | 796 s | 1021 s |
| LVSA-FI | 395 s | 621 s | 802 s |
Total: ~9 hours on single A100, ~70 min on 8×A100 via GNU parallel.
UltraViCo is excluded — it lives in a separate repo (thu-ml/DiT-Extrapolation, branch ultra-wan) with a different CLI. See the paper appendix for the UltraViCo recipe.
Latency scaling (single-prompt frame sweep)
For the headline 3.14× claim and the latency figure on the README:
export OUTDIR=out/latency_scaling
bash benchmarks/latency_scaling.sh
Frame counts swept: 81 (1×) / 161 (2×) / 321 (4×) / 481 (6×). Methods: Dense + LVSA-FI.
Score with VQeval
bash benchmarks/score_vqeval.sh out/sota_comparison
# Writes <stem>.vqeval.json next to each mp4
VQeval scores 6 dimensions + composite. Single A100 + the bundled vqeval/ subpackage. Expect ~15 min for 60 videos.
Score with VBench-Long
VBENCH_REPO=/path/to/VBench \
VBENCH_PYTHON=/path/to/vbench-venv/bin/python \
bash benchmarks/score_vbench.sh out/sota_comparison
# Writes <stem>.vbench.json next to each mp4
VBench-Long scores 5 dimensions: subject_consistency, temporal_flickering, motion_smoothness, background_consistency, imaging_quality.
Aggregate
python benchmarks/aggregate.py --outdir out/sota_comparison
# Writes _summary.csv (60 rows) and _summary_means.csv (12 cells)
The aggregator walks the output directory, parses tags (<model>__<backend>__<horizon>__<prompt>), loads the per-video JSONs, and emits tidy + means CSVs.
Regenerate figures
python benchmarks/generate_figures.py \
--sota-csv out/sota_comparison/_summary_means.csv \
--scaling-csv out/latency_scaling/_summary_means.csv \
--outdir docs/figures/
Produces 4 PNGs at 300 DPI:
latency_scaling.png— Wan 1.3B Dense vs LVSA wall-time scalingcrossmodel_speedup.png— speedup-vs-Dense bar charthv_latency_scaling.png— HunyuanVideo wall-time scalingsparsity_vs_frames.png— per-query attended fraction by model
Expected results (5-prompt mean)
Wall time and speedup vs Dense
| Horizon | LVSA (SDPA) | LVSA-FI | LVSA-FI vs Dense |
|---|---|---|---|
| 2× | 502 s | 395 s | 1.43× |
| 3× | 796 s | 621 s | 1.84× |
| 4× | 1021 s | 802 s | 2.41× |
Speedup vs UltraViCo (from paper appendix data)
| Horizon | LVSA-FI vs UltraViCo |
|---|---|
| 2× | 1.88× |
| 3× | 2.49× |
| 4× | 3.27× |
Quality (VQeval composite, Δ vs Dense)
| Horizon | LVSA-FI Δ |
|---|---|
| 2× | +6.5 |
| 3× | +11.2 |
| 4× | +9.9 |
Quality (VBench-Long imaging_quality, Δ vs Dense)
| Horizon | LVSA-FI Δ |
|---|---|
| 2× | +0.09 |
| 3× | +0.04 |
| 4× | +0.10 |
Tips
- Idempotency: all scripts skip cells whose
.mp4(or.vqeval.json,.vbench.json) already exists. Crash-and-resume works. - Seed: 16 matches the paper. Change
SEED=<n>to get a different RNG roll. - Resolution: 480×832 is the default and matches the paper. Higher resolutions need
LVSA_PATCHES_PER_FRAMEset or VIDEO_HEIGHT/WIDTH for the vllm-omni plugin. - 8× A100 parallel: the dev repo at
scripts/paper_results/sota_job_runner.shships aflock-queued GNU-parallel orchestrator. The pruned recipe inbenchmarks/is single-GPU sequential.
Adapting to other models
Change the example invocation in benchmarks/sota_comparison.sh from examples/wan_generate.py to examples/hunyuan_generate.py (and the HORIZONS arrays to HunyuanVideo's range: 65/129/193/257). The aggregator and figure scripts handle any model tag.
When not to use it
- →When evaluating UltraViCo, as it is in a separate repository.
- →When using a different resolution than 480x832 without setting LVSA_PATCHES_PER_FRAME.
Prerequisites
Limitations
- →UltraViCo is excluded and requires a separate repository.
- →Higher resolutions than 480x832 require specific configuration.
- →The pruned recipe in benchmarks/ is single-GPU sequential.
How it compares
This skill automates the entire reproduction workflow for the LVSA paper, including environment setup, video generation, and multiple scoring methods, which is more efficient than manual execution of each step.
Compared to similar skills
lvsa-reproduce-paper side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| lvsa-reproduce-paper (this skill) | 0 | 2mo | Review | Intermediate |
| esm | 3 | 7mo | Review | Advanced |
| hugging-face-paper-publisher | 6 | 6mo | Review | Intermediate |
| torchdrug | 3 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
esm
davila7
Comprehensive toolkit for protein language models including ESM3 (generative multimodal protein design across sequence, structure, and function) and ESM C (efficient protein embeddings and representations). Use this skill when working with protein sequences, structures, or function prediction; designing novel proteins; generating protein embeddings; performing inverse folding; or conducting protein engineering tasks. Supports both local model usage and cloud-based Forge API for scalable inference.
hugging-face-paper-publisher
patchy631
Publish and manage research papers on Hugging Face Hub. Supports creating paper pages, linking papers to models/datasets, claiming authorship, and generating professional markdown-based research articles.
torchdrug
davila7
Graph-based drug discovery toolkit. Molecular property prediction (ADMET), protein modeling, knowledge graph reasoning, molecular generation, retrosynthesis, GNNs (GIN, GAT, SchNet), 40+ datasets, for PyTorch-based ML on molecules, proteins, and biomedical graphs.
string-database
davila7
Query STRING API for protein-protein interactions (59M proteins, 20B interactions). Network analysis, GO/KEGG enrichment, interaction discovery, 5000+ species, for systems biology.
transformer-lens-interpretability
davila7
Provides guidance for mechanistic interpretability research using TransformerLens to inspect and manipulate transformer internals via HookPoints and activation caching. Use when reverse-engineering model algorithms, studying attention patterns, or performing activation patching experiments.
denario
davila7
Multiagent AI system for scientific research assistance that automates research workflows from data analysis to publication. This skill should be used when generating research ideas from datasets, developing research methodologies, executing computational experiments, performing literature searches, or generating publication-ready papers in LaTeX format. Supports end-to-end research pipelines with customizable agent orchestration.