w
gcw_uQ09W7jl/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_version": "2.9.0+cpu",
  "torch_npu_available": true,
  "device_name": "Ascend910_9362",
  "device_count": 2
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "video_shape": [
    1,
    3,
    17,
    256,
    256
  ],
  "resolution": "256x256",
  "frames": 17,
  "normalized": "-1~1",
  "seed": 42,
  "weight_key": "video_tokenizer.encoder.module_dict.enc_patch_emb.patch_proj.weight",
  "chunk_size": 17,
  "overlap": 1
}

真实推理结果

{
  "tokens_shape": [
    1,
    5,
    256
  ],
  "reconst_shape": [
    1,
    3,
    17,
    256,
    256
  ],
  "tokens_device": "npu:0",
  "reconst_device": "npu:0",
  "tokens_dtype": "torch.int64",
  "reconst_dtype": "torch.float32"
}

CPU-NPU 一致性

{
  "token_ids_match": true,
  "max_abs_diff": 0.0,
  "mean_abs_diff": 0.0,
  "reconst_psnr": 42.87195790373729,
  "reconst_mse": 5.161836088518612e-05,
  "self_consistency": true
}

性能

{
  "npu_inference_ms": 162.58740425109863,
  "stable_ms": 1.9986629486083984,
  "frames_per_s": 104.5591451459877,
  "tokens_per_s": 7872.688575697897,
  "dtype": "float32",
  "resolution": "256x256",
  "frames": 17,
  "peak_memory_gb": 0.031634944
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。

标签

#NPU #Ascend #Ascend910