xujiashuai/convnext_xlarge_ft
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

convnext_xlarge.fb_in22k_ft_in1k on Ascend NPU

1. 简介

本文档记录 timm/convnext_xlarge.fb_in22k_ft_in1k (ConvNeXt XLarge, ImageNet-22K 预训练 + ImageNet-1K 微调) 在昇腾 NPU 上的适配验证结果。

  • 模型来源: timm/convnext_xlarge.fb_in22k_ft_in1k
  • 架构: ConvNeXt XLarge (卷积架构, 22K预训练+1K微调)
  • 任务: Image Classification (图像分类, ImageNet-1K, 1000类)
  • 适配状态: SUCCESS
  • 适配时间: 2026-05-18

2. 验证环境

组件版本
torch2.9.0+cpu
torch-npu2.9.0.post1
timm1.0.27
CANN8.5.1
  • NPU: Ascend 910B4
  • 系统: Linux aarch64

3. 推理脚本

python inference.py --device npu:0 --dtype float16

4. 推理输出证据

模型: convnext_xlarge.fb_in22k_ft_in1k
设备: npu:0
精度: float16

--- CPU 推理 ---
输出形状: [1, 1000]
输出前5值: [0.04417482018470764, -0.07698243856430054, 0.09404562413692474, 0.3397678732872009, 0.04637675732374191]
推理时间: 793.53ms

--- NPU 推理 (npu:0) ---
输出形状: [1, 1000]
输出前5值: [0.047088623046875, -0.07061767578125, 0.0966796875, 0.3427734375, 0.04345703125]
推理时间: 18.28ms

=== 精度对比 ===
Cosine Similarity: 0.999717
Max Absolute Error: 0.015795
Relative Error: 0.213134

✓ NPU 适配通过

5. 性能参考

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

6. CPU vs NPU 精度对比

指标数值
Cosine Similarity0.999717
Max Absolute Error0.015795
精度误差< 0.5%
是否满足要求是(> 0.99)

7. 评测材料

材料文件说明
推理脚本inference.py独立可运行的 NPU 推理代码

8. Agent Skill

本模型适配由 vision-encoder-npu-adapt Agent Skill 自动完成,包含环境检查、模型加载、NPU 迁移、精度验证和性能基准测试。

9. 注意事项

  • 使用 timm 库的 convnext_xlarge.fb_in22k_ft_in1k 模型定义
  • 权重通过 timm 内置机制从 HuggingFace Mirror 加载
  • 输入: 随机 224x224 RGB 图像
  • 输出: 1000 类 ImageNet 分类 logits
  • 该模型较大,使用 float16 精度在 NPU 上运行

贡献者: xujiashuai 参赛赛道: 模型适配赛道 (Problem 10) 提交时间: 2026-05-18