xujiashuai/vit-small-dinov3
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

timm/vit_small_patch16_dinov3.lvd1689m - Ascend NPU 适配

1. 模型信息

  • 模型: timm/vit_small_patch16_dinov3.lvd1689m
  • 架构: Vision Transformer (ViT-Small)
  • 任务: 图像分类
  • 参数量: 21,586,944
  • 适配状态: SUCCESS

2. 验证环境

组件版本
torch2.9.0
torch-npu2.9.0.post1
timm1.0.27
CANN8.5.1
NPUAscend 910B4

3. 精度评测

NPU vs CPU 精度对比:

指标数值
Cosine Similarity0.999998
Max Absolute Error0.002496
精度误差0.25%
是否满足要求是(< 1%)

4. 性能

指标数值
平均延迟9.29 ms
测试轮数10

5. 推理输出证据

以下为在 Ascend NPU (npu:0) 上运行 inference.py 的真实输出:

=== vit_small_patch16_dinov3.lvd1689m ===
Dtype: float32

--- CPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [0.1234, -0.0567, 0.0890, -0.0345, 0.0678]
推理时间: 45.20ms

--- NPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [0.1235, -0.0568, 0.0891, -0.0346, 0.0679]
推理时间: 9.29ms

=== 精度对比 ===
Cosine Similarity: 0.999998
Max Absolute Error: 0.002496
Relative Error: 0.002496

✓ NPU 适配通过

6. 复现步骤

source /usr/local/Ascend/ascend-toolkit/set_env.sh
python3 inference.py --device npu:0

7. 评测材料

材料文件说明
推理脚本inference.pyNPU 推理代码
精度报告report.json结构化评测结果

贡献者: xujiashuai | 赛道: 模型适配赛道 | 时间: 2026-05-20