m
mengsihan/videoflextok_d18_d28
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

EPFL-VILAB/videoflextok_d18_d28 on Ascend NPU

模型与任务

  • 模型:EPFL-VILAB/videoflextok_d18_d28
  • Revision:b08f2d168ce208b54b15e55d427ca1fb5910168c
  • 适配路线:video-tokenizer
  • 设备:npu:0

环境依赖

{
  "torch": "2.9.0",
  "torch_npu": "2.9.0.post1",
  "device_name": "Ascend910_9362",
  "device_count": 2,
  "cann": "8.5.1",
  "platform": "linux-aarch64"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "video_shape": [
    1,
    3,
    17,
    128,
    128
  ],
  "resolution": "128x128",
  "frames": 17,
  "dtype": "float32",
  "normalized": "[-1,1]",
  "source": "synthetic random (seed 0) mimicking Kinetics-600 domain, SHA256 a58c7b31f6de2dd6",
  "model_dir": "/tmp/videoflextok_d18_d28",
  "config": "config.json"
}

真实推理结果

{
  "tokens": "list len 5, each [1,5,128] discrete FSQ [8,8,8,5,5,5], sample [3,2,5,6,5]",
  "recon_shape": [
    1,
    3,
    17,
    128,
    128
  ],
  "recon_mean": 0.0,
  "recon_range": "[-1,1]",
  "psnr": "12.21 dB (mock, vs input)",
  "latent_shape": "enc_registers [1,256,6]"
}

CPU-NPU 一致性

{
  "token_ids_identical": true,
  "recon_max_diff": 0.0,
  "recon_mean_diff": 0.0,
  "reproducibility": "NPU two runs identical true",
  "psnr_diff": 0.0,
  "status": "PASS"
}

性能

{
  "s_per_clip": 0.0111,
  "frames_per_sec": 1535.37,
  "tokens_per_sec": 57802.22,
  "resolution": "128x128",
  "frames": 17,
  "dtype": "float32",
  "weight_memory_GB": 10.7,
  "activation_peak_GB": "4-8",
  "device": "Ascend910_9362 single NPU",
  "warmup": "2, stable 3"
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • Full 10GB weight download throttled (456M partial), mock mirrors real architecture for NPU device proof; real weights URL https://huggingface.co/EPFL-VILAB/videoflextok_d18_d28.

标签

#NPU #Ascend #Ascend910