v
v_50/timm-convnext_xxlarge.clip_laion2b_soup_ft_in1k-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

convnext_xxlarge.clip_laion2b_soup_ft_in1k — Ascend NPU Adaptation

Image Classification model adapted for Huawei Ascend NPU (Ascend910B)

1. Model Overview

ItemDetail
Modelconvnext_xxlarge.clip_laion2b_soup_ft_in1k
Frameworktimm (PyTorch)
TaskImage Classification (ImageNet-1K, 1000 classes)
Parameters846.5M
SourceModelScope

2. Environment

  • Hardware: Ascend 910B4-1
  • OS: Linux (aarch64)
  • Python: 3.10
  • PyTorch: 2.10.0+torch_npu
  • timm: 1.0.27
  • CANN: 8.x

3. Files

├── model_utils.py          # Model loading & preprocessing utilities
├── inference.py            # Single-image inference script
├── eval_accuracy.py        # CPU-NPU accuracy consistency check
├── benchmark.py            # Performance benchmark script
├── assets/
│   └── test.jpg            # Test image
├── logs/
│   ├── inference.log       # Inference output
│   ├── accuracy.log        # Accuracy comparison
│   └── benchmark.log       # Performance data
└── README.md

4. Quick Start

# Install dependencies
pip install torch torch-npu timm modelscope

# Run inference
python inference.py

5. Inference Results

Single test image on NPU:

RankClassProbability

6. Accuracy: CPU vs NPU

MetricValue
max_abs_error0.058968
mean_abs_error0.007984
relative_error1.0280%
cosine_similarity0.999954
Top-1 matchTrue

Note: This is a smoke consistency check on a single test image, not an official ImageNet full validation set evaluation.

7. Performance

MetricValue
Throughputimages_per_sec 24.04 images/sec
DeviceNPU:0 (Ascend 910B)
PrecisionFP32

8. Reproduce

# 1. Download model weights
python -c "from modelscope import snapshot_download; snapshot_download('timm/convnext_xxlarge.clip_laion2b_soup_ft_in1k', cache_dir='/data/modelscope_cache')"

# 2. Run inference
python inference.py

# 3. Check accuracy
python eval_accuracy.py

# 4. Run benchmark
python benchmark.py

9. 竞赛提交信息

ItemDetail
原始权重地址convnext_xxlarge.clip_laion2b_soup_ft_in1k
提交项目地址timm-convnext_xxlarge.clip_laion2b_soup_ft_in1k-NPU
适配框架torch_npu
适配硬件Ascend 910B

10. Notes

  • Model weights are NOT included in this repository
  • Weights are downloaded from ModelScope via snapshot_download
  • FP32 precision used for all inference and accuracy checks

11. Tags

NPU Ascend Ascend910 torch_npu timm ImageClassification #convnext_xxlarge.clip_laion2b_soup_ft_in1k