适配大赛交付件:模型简介 / 环境依赖 / 分步推理 / 测试用例+输出 / NPU 截图
| 项 | 内容 |
|---|---|
| 模型名称 | fairface_age_image_detection |
| 模型链接 | dima806/fairface_age_image_detection |
| 模型描述 | {模型适用场景一句话} |
| 模型架构 | {如 Transformer / CNN / ViT} |
| 参数规模 | {如 27B / 300M} |
| 适配结论 | 昇腾 NPU 推理适配 PASS(rel-L2 < 1%,全有限) |
| 依赖 | 版本 | 说明 |
|---|---|---|
| Python | >= 3.10 | 推荐 3.11 |
| torch / torch_npu | 2.1.0+ / 2.9.0.post1 | 昇腾 NPU 运行库 |
| transformers | >= 4.45.0 | 模型加载 |
| CANN | 8.0.RC2+ | 昇腾驱动 |
安装命令:
pip install -r requirements.txt
# torch_npu 按 CANN 官方指引安装npu-smi infopython minimal_repro.py --model-path dima806/fairface_age_image_detectionpython inference.py --input "测试输入内容" --model-path dima806/fairface_age_image_detection参数说明:
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| --input | str | - | 单条输入 |
| --input-file | str | - | 批量输入文件 |
| --model-path | str | dima806/fairface_age_image_detection | 模型 ID / 本地路径 |
| --max-tokens | int | 2048 | 最大生成长度 |
输入:
{样例输入}输出:
{样例输出}输入:
{样例输入}输出:
{样例输出}完整结果见
results/inference_results_*.json(真实运行证据)。


