pytorch-image-models
pytorch-image-models 是 PyTorch 生态中规模最大、最全面的图像编码器与骨干网络集合库。它一站式集成了从模型训练、评估、推理到导出的完整脚本流程,并提供了丰富的预训练权重,覆盖了 ResNet、EfficientNet、Vision Transformer (ViT)、Swin Transformer、ConvNeXt 以及最新的 MobileNetV4 等主流前沿架构。
该工具主要解决了研究人员和开发者在复现论文模型时面临的代码分散、标准不一及预训练资源难获取等痛点。通过提供统一且经过严格验证的代码实现,它让用户无需重复造轮子,即可快速搭建高性能的计算机视觉应用或开展学术实验。
pytorch-image-models 特别适合 AI 研究人员、算法工程师及深度学习开发者使用。无论是需要微调模型以适应特定场景,还是希望对比不同架构的性能表现,都能在此找到可靠支持。其独特亮点在于极高的更新频率与广泛的模型覆盖率,不仅及时跟进学术界最新成果(如差分注意力机制、新型优化器 AdaMuon 等),还针对推理速度进行了深度优化,并提供详尽的基准测试数据。此外,项目高度重视安全性与兼容性,持续改进检查点加载机制并适配最新 PyTorch 版本,是构建视觉系统值得信赖的基础设施。
使用场景
某计算机视觉团队正在为电商平台的商品自动分类系统开发高精度图像识别模型,急需在有限算力下快速验证多种前沿架构。
没有 pytorch-image-models 时
- 模型复现成本极高:工程师需手动从论文代码库移植 ResNeXT、EfficientNet 或 Vision Transformer 等模型,常因细节差异导致无法收敛或精度不达标。
- 训练流程重复造轮子:缺乏统一的训练、验证和推理脚本,每次尝试新架构(如 Swin Transformer 或 ConvNeXt)都需重写数据加载与优化器配置逻辑。
- 预训练权重难对齐:不同来源的预训练权重格式混乱,加载时需编写复杂的适配代码,且难以确保预处理步骤与官方训练一致。
- 实验迭代缓慢:由于环境配置和代码调试耗时过长,一周内仅能完成 1-2 种模型架构的基准测试,严重拖慢项目进度。
使用 pytorch-image-models 后
- 一键调用百种架构:通过
timm.create_model()即可实例化包括 MobileNetV4、MaxViT 在内的数百种编码器,直接复用经过严格验证的官方实现。 - 全流程脚本开箱即用:直接利用库内置的 train/eval/inference 脚本,配合新增的 NAdaMuon 优化器支持,迅速搭建起标准化的训练流水线。
- 权重加载安全便捷:借助更新的
weights_only=True安全机制和统一的 Hugging Face 权重源,无缝加载 CSATv2 等最新高分模型的预训练参数。 - 研发效率显著提升:团队能在两天内完成十几种主流及前沿模型的对比实验,快速锁定最适合商品细粒度分类的架构方案。
pytorch-image-models 通过将碎片化的模型实现标准化,让研发团队从繁琐的代码工程中解放出来,专注于核心算法的优化与业务落地。
运行环境要求
- Linux
- macOS
- Windows
- 非必需(支持 CPU 运行),但训练和推理建议使用 NVIDIA GPU
- README 提及测试环境包含 RTX 4090, 5090, Pro 6000,支持 Flash Attention (F.SDPA) 优化
- 具体显存和 CUDA 版本未说明,取决于所选模型大小及 PyTorch 版本
未说明(取决于模型规模,大型 ViT 模型建议 32GB+)

快速开始
PyTorch 图像模型
新增内容
2026年3月23日
- 改进 pickle 检查点处理的安全性。默认所有加载操作都设置为
weights_only=True,并为 ArgParse 添加安全全局变量。 - 改进核心 ViT/EVA 模型及层的注意力掩码处理。解析布尔掩码,并将
is_causal参数传递给 SSL 任务。 - 修复在启用 ViT 且未使用位置嵌入时的类和注册标记用法问题。
- 在 ViT 中添加补丁表示精炼 (PRR) 作为池化选项。感谢 Sina (https://github.com/sinahmr)。
- 提高注意力池化层输出投影/MLP 维度的一致性。
- 对 Hiera 模型进行 F.SDPA 优化,以支持 Flash Attention 内核的使用。
- 向 SGDP 优化器添加警告信息。
- 发布 1.0.26 版本。这是我离开 Hugging Face 以来的首个维护版本。
2026年2月23日
- 在蒸馏任务包装器中添加标记蒸馏训练支持。
- 为正式弃用做准备,移除部分 torch.jit 的使用。
- 向 AdamP 优化器添加警告信息。
- 即使是元设备初始化,也调用
reset_parameters()方法,以便使用诸如init_empty_weights等技巧来初始化缓冲区。 - 调整 Muon 优化器,使其与 DTensor/FSDP2 兼容(使用
clamp_而不是clamp_min_,为 DTensor 使用替代的 NS 分支)。 - 发布 1.0.25 版本。
2026年1月21日
- 兼容性破坏:修复
ParallelScalingBlock(以及DiffParallelScalingBlock)中 QKV 和 MLP 偏置的疏忽。- 这不会影响任何已训练的
timm模型,但可能会影响下游应用。
- 这不会影响任何已训练的
2026年1月5日和6日
- 发布 1.0.24 版本。
- 添加新的基准测试结果 CSV 文件,用于在 RTX Pro 6000、5090 和 4090 显卡上,使用 PyTorch 2.9.1 进行所有模型的推理时间测试。
- 修复已弃用的
timm.models.layers导入路径中的模块移动错误,该错误影响旧版导入。 - 发布 1.0.23 版本。
2025年12月30日
- 添加性能更好的 NAdaMuon 训练的
dpwee、dwee、dlittle(差异)ViT 模型,相比之前的运行略有提升。 - 在 512x512 和 640x640 尺寸下,添加一个约 2100 万参数的
timm变体 CSATv2 模型。 - 将非持久化参数的初始化从
__init__方法中提取出来,放入一个公共方法中,可在元设备初始化后通过init_non_persistent_buffers()外部调用。
2025年12月12日
- 添加 CSATV2 模型(感谢 https://github.com/gusdlf93)——一种轻量级但高分辨率的模型,带有 DCT 主干和空间注意力。https://huggingface.co/Hyunil/CSATv2。
- 在现有的
timmMuon 实现中添加 AdaMuon 和 NAdaMuon 优化器支持。对于图像任务,它似乎比 AdamW 更具竞争力,且具有熟悉的超参数。 - 年终 PR 清理,合并多个长期开放的 PR。
- 合并差异注意力 (
DiffAttention),添加相应的DiffParallelScalingBlock(适用于 ViT),并训练一些小型 ViT 模型。 - 添加几个池化模块,如
LsePlus和SimPool。 - 清理并优化
DropBlock2d(同时为 ByobNet 基础模型添加支持)。
- 合并差异注意力 (
- 将单元测试升级到 PyTorch 2.9.1 和 Python 3.13 的较高版本,而较低版本仍保持 PyTorch 1.13 和 Python 3.10。
2025年12月1日
- 添加轻量级任务抽象,通过新任务在训练脚本中支持 logits 和特征蒸馏。
- 移除旧的 APEX AMP 支持。
2025年11月4日
- 修复 LayerScale / LayerScale2d 初始化错误(初始值被忽略),该错误是在 1.0.21 版本中引入的。感谢 https://github.com/Ilya-Fradlin。
- 发布 1.0.22 版本。
2025年10月31日 🎃
- 更新 ImageNet 和 OOD 变体结果 CSV 文件,加入几款新模型,并在多个 PyTorch 和
timm版本中验证其正确性。 - 添加 EfficientNet-X 和 EfficientNet-H B5 模型权重,作为 AdamW 与 Muon 超参数搜索的一部分(仍在迭代 Muon 运行)。
2025年10月16日至20日
- 添加基于 https://github.com/KellerJordan/Muon 的 Muon 优化器实现,并进行定制。
- 提供额外的灵活性,改进对卷积权重的处理,并为不适合正交化的权重形状提供回退机制。
- 通过减少内存分配和使用融合的 (b)add(b)mm 操作,小幅提升了 NS 迭代的速度。
- 默认情况下,如果参数形状不适合使用 Muon(或通过参数组标志排除),则会使用 AdamW(或若
nesterov=True则使用 NAdamW)更新。 - 类似于 PyTorch 实现,可通过
adjust_lr_fn选择多种 LR 缩放调整函数。 - 可以选择几种 NS 系数预设,或通过
ns_coefficients自定义自己的系数。
- 支持“meta”设备模型初始化的前两步。
- 修复了几种在“meta”设备上下文中创建时会出错的操作。
- 在
timm中的所有模型和模块(任何继承自 nn.Module 的对象)中添加了设备和 dtype 工厂关键字参数的支持。
- 在代码中的预训练配置文件中添加了许可证字段。
- 发布 1.0.21 版本。
2025年9月21日
- 将 DINOv3 ViT 权重标签从
lvd_1689m重新映射为lvd1689m,以保持一致(同样适用于sat_493m->sat493m)。 - 发布 1.0.20 版本。
2025年9月17日
- 添加 DINOv3(https://arxiv.org/abs/2508.10104)ConvNeXt 和 ViT 模型。ConvNeXt 模型被映射到现有的
timm模型。ViT 支持则通过 EVA 基础模型实现,并使用新的RotaryEmbeddingDinoV3来匹配 DINOv3 特有的 RoPE 实现。 - MobileCLIP-2(https://arxiv.org/abs/2508.20691)视觉编码器。添加了新的 MCI3/MCI4 FastViT 变体,并将权重映射到现有的 FastViT 和 B、L/14 ViT 模型。
- 添加 MetaCLIP-2 Worldwide(https://arxiv.org/abs/2507.22062)ViT 编码器权重。
- 通过 timm NaFlexViT 模型添加 SigLIP-2(https://arxiv.org/abs/2502.14786)NaFlex ViT 编码器权重。
- 其他修复和贡献。
2025年7月23日
- 在 EVA 模型中添加
set_input_size()方法,OpenCLIP 3.0.0 使用该方法允许对基于timm的编码器模型进行大小调整。 - 发布 1.0.18 版本,这是 OpenCLIP 3.0.0 中 PE-Core S 和 T 模型所需的版本。
- 修复一个小的类型问题,该问题导致 Python 3.9 不兼容。发布 1.0.19 补丁版本。
2025年7月21日
- NaFlexViT新增ROPE支持。所有由EVA基础模块(
eva.py)覆盖的模型,包括EVA、EVA02、Meta PE ViT、带有ROPE的timmSBB ViT以及Naver ROPE-ViT,现在都可以在创建模型时传入use_naflex=True参数后加载到NaFlexViT中。 - 增加了更多Meta PE ViT编码器,包括小型/微型变体、带分块处理的语言变体,以及更多空间变体。
- 修复了NaFlexViT及EVA模型中的PatchDropout问题(在添加Naver ROPE-ViT后出现的回归问题)。
- 修正了grid_indexing='xy'模式下的XY顺序问题,该问题影响了在‘xy’模式下使用非正方形图像的情况(仅ROPE-ViT和PE受影响)。
2025年7月7日
- 对MobileNet-v5主干网络进行了调整,以改善Google Gemma 3n的表现(配合更新的官方权重):
- 添加了stem偏置项(在更新的权重中已置零,与旧权重不兼容);
- 将激活函数从GELU改为GELU(tanh近似)。这一小幅改动旨在更接近JAX实现。
- 为层衰减支持新增两个参数:最小缩放系数限制和“无优化”缩放阈值。
- 新增‘Fp32’版本的LayerNorm、RMSNorm和SimpleNorm变体,可启用以强制在float32精度下进行归一化计算。
- 针对上述内容,对归一化层及其激活组合层的类型注解和参数进行了清理。
- 在
eva.py中支持Naver ROPE-ViT(https://github.com/naver-ai/rope-vit),并新增RotaryEmbeddingMixed模块用于混合模式,权重已发布至HuggingFace Hub。
| 模型 | 图像尺寸 | Top-1准确率 | Top-5准确率 | 参数量 |
|---|---|---|---|---|
| vit_large_patch16_rope_mixed_ape_224.naver_in1k | 224 | 84.84 | 97.122 | 304.4 |
| vit_large_patch16_rope_mixed_224.naver_in1k | 224 | 84.828 | 97.116 | 304.2 |
| vit_large_patch16_rope_ape_224.naver_in1k | 224 | 84.65 | 97.154 | 304.37 |
| vit_large_patch16_rope_224.naver_in1k | 224 | 84.648 | 97.122 | 304.17 |
| vit_base_patch16_rope_mixed_ape_224.naver_in1k | 224 | 83.894 | 96.754 | 86.59 |
| vit_base_patch16_rope_mixed_224.naver_in1k | 224 | 83.804 | 96.712 | 86.44 |
| vit_base_patch16_rope_ape_224.naver_in1k | 224 | 83.782 | 96.61 | 86.59 |
| vit_base_patch16_rope_224.naver_in1k | 224 | 83.718 | 96.672 | 86.43 |
| vit_small_patch16_rope_224.naver_in1k | 224 | 81.23 | 95.022 | 21.98 |
| vit_small_patch16_rope_mixed_224.naver_in1k | 224 | 81.216 | 95.022 | 21.99 |
| vit_small_patch16_rope_ape_224.naver_in1k | 224 | 81.004 | 95.016 | 22.06 |
| vit_small_patch16_rope_mixed_ape_224.naver_in1k | 224 | 80.986 | 94.976 | 22.06 |
- 对ROPE模块、辅助工具及FX追踪叶节点注册进行了部分清理。
- 正在准备1.0.17版本发布。
2025年6月26日
- 提供了适用于Gemma 3n图像编码器的MobileNetV5主干网络(仅含编码器变体)。
- 发布了1.0.16版本。
2025年6月23日
- 在NaFlexViT中新增基于F.grid_sample的2D及因子化位置编码插值功能。当需要处理大量不同尺寸时,此方法更为高效(参考自https://github.com/stas-sl的示例)。
- 进一步加速patch嵌入重采样过程,将vmap替换为矩阵乘法(参考自https://github.com/stas-sl的代码片段)。
- 在测试过程中生成了3个初始的原生宽高比NaFlexViT检查点,分别对应ImageNet-1k数据集及3种不同的位置编码配置,且具有相同的超参数。
| 模型 | Top-1准确率 | Top-5准确率 | 参数量(M) | 评估序列长度 |
|---|---|---|---|---|
| naflexvit_base_patch16_par_gap.e300_s576_in1k | 83.67 | 96.45 | 86.63 | 576 |
| naflexvit_base_patch16_parfac_gap.e300_s576_in1k | 83.63 | 96.41 | 86.46 | 576 |
| naflexvit_base_patch16_gap.e300_s576_in1k | 83.50 | 96.46 | 86.63 | 576 |
- 支持
forward_intermediates梯度检查点,并修复了一些检查点相关的bug。感谢https://github.com/brianhou0208的贡献。 - 将AdamW(传统)、Adopt、Kron、Adafactor(BV)、Lamb、LaProp、Lion、NadamW、RmsPropTF、SGDW等优化器的权重衰减选项更新为“修正版权重衰减”(https://arxiv.org/abs/2506.02285)。
- 将PE(感知编码器)ViT模型切换为使用原生timm权重,而非实时重新映射。
- 修复了预取加载器中的CUDA流bug。
2025年6月5日
- 初始的NaFlexVit模型代码。NaFlexVit是一种视觉Transformer,具备以下特性:
- 将嵌入和位置编码封装在一个模块中;
- 支持对预分割(字典形式)输入进行nn.Linear patch嵌入;
- 支持NaFlex的可变宽高比和分辨率(SigLip-2:https://arxiv.org/abs/2502.14786);
- 支持FlexiViT的可变patch大小(https://arxiv.org/abs/2212.08013);
- 支持NaViT的分数/因子化位置编码(https://arxiv.org/abs/2307.06304)。
- 现有的
vision_transformer.py中的ViT模型可以通过在create_model中添加use_naflex=True标志加载到NaFlexVit模型中。- 部分原生权重即将推出。
- 提供了一套完整的NaFlex数据流水线,支持使用可变宽高比/尺寸的图像进行训练/微调/评估。
- 在
train.py和validate.py中添加--naflex-loader参数即可启用,但必须与NaFlexVit模型配合使用。
- 在
- 使用NaFlex数据流水线评估已加载到NaFlexVit模型中的现有(经典)ViT模型:
python validate.py /imagenet --amp -j 8 --model vit_base_patch16_224 --model-kwargs use_naflex=True --naflex-loader --naflex-max-seq-len 256
- 训练过程中还有一些值得注意的额外参数功能:
--naflex-train-seq-lens参数指定了训练时每批次随机选择的序列长度范围;--naflex-max-seq-len参数设置了验证时的目标序列长度;- 添加
--model-kwargs enable_patch_interpolator=True --naflex-patch-sizes 12 16 24将启用每批次随机选择patch大小并进行插值的功能; --naflex-loss-scale参数会根据批次大小动态调整损失缩放模式,而timm的NaFlex加载方式会为每个序列长度调整批次大小。
2025年5月28日
- 感谢 https://github.com/brianhou0208 的贡献,新增了一批小型/快速模型:
- SwiftFormer - (ICCV2023) SwiftFormer:用于基于Transformer的实时移动视觉应用的高效加性注意力机制
- FasterNet - (CVPR2023) 跑起来,别走着:追求更高FLOPS以实现更快的神经网络
- SHViT - (CVPR2024) SHViT:具有内存效率的单头视觉Transformer
- StarNet - (CVPR2024) 重写星辰
- GhostNet-V3 GhostNetV3:探索紧凑模型的训练策略
- 更新EVA ViT(最接近的匹配)以支持Meta的Perception Encoder模型(https://arxiv.org/abs/2504.13181),加载Hub权重,但我仍需推送专门的`timm`权重。
- 为ROPE实现增加了一些灵活性。
- 在https://github.com/brianhou0208的帮助下,支持`forward_intermediates()`的模型数量大幅增加,并进行了一些额外的修复。
- 包括DaViT、EdgeNeXt、EfficientFormerV2、EfficientViT(MIT)、EfficientViT(MSRA)、FocalNet、GCViT、HGNet /V2、InceptionNeXt、Inception-V4、MambaOut、MetaFormer、NesT、Next-ViT、PiT、PVT V2、RepGhostNet、RepViT、ResNetV2、ReXNet、TinyViT、TResNet、VoV等。
- TNT模型已使用新权重更新了
forward_intermediates(),感谢https://github.com/brianhou0208。 - 添加
local-dir:预训练模式,可以使用local-dir:/path/to/model/folder作为模型名称,从本地文件夹中加载Hugging Face Hub模型的配置文件和权重文件。 - 修复并改进了ONNX导出功能。
2025年2月21日
- 新增SigLIP 2 ViT图像编码器(https://huggingface.co/collections/timm/siglip-2-67b8e72ba08b09dd97aecaf9)。
- 可变分辨率/宽高比的NaFlex版本仍在开发中。
- 新增采用SBB配方训练的‘SO150M2’ViT权重,效果极佳,相比之前的尝试,在ImageNet上的表现更好,且训练量更少。
vit_so150m2_patch16_reg1_gap_448.sbb_e200_in12k_ft_in1k- Top-1准确率88.1%vit_so150m2_patch16_reg1_gap_384.sbb_e200_in12k_ft_in1k- Top-1准确率87.9%vit_so150m2_patch16_reg1_gap_256.sbb_e200_in12k_ft_in1k- Top-1准确率87.3%vit_so150m2_patch16_reg4_gap_256.sbb_e200_in12k
- 更新InternViT-300M ‘2.5’权重。
- 发布1.0.15版本。
2025年2月1日
- 特别说明:PyTorch 2.6和Python 3.13已在当前主分支及发布的
timm版本中测试通过并正常工作。
2025年1月27日
- 新增Kron优化器(带有克罗内克分解预条件的PSGD)。
2025年1月19日
- 修复LeViT safetensor权重的加载问题,移除本应已停用的转换代码。
- 新增采用SBB配方训练的‘SO150M’ViT权重,效果尚可,但其形状并不适合ImageNet-12k/1k的预训练和微调。
vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k_ft_in1k- Top-1准确率86.7%vit_so150m_patch16_reg4_gap_384.sbb_e250_in12k_ft_in1k- Top-1准确率87.4%vit_so150m_patch16_reg4_gap_256.sbb_e250_in12k
- 进行了一些类型注解、拼写错误等方面的清理。
- 发布1.0.14版本以修复上述LeViT问题。
2025年1月9日
- 增加对纯
bfloat16或float16训练和验证的支持。 - 由https://github.com/caojiaolong添加了`wandb`项目名称参数,使用arg.experiment指定名称。
- 修复旧问题:在不支持硬链接的文件系统上无法保存检查点(例如FUSE挂载的文件系统)。
- 发布1.0.13版本。
2025年1月6日
- 在
timm.models中添加torch.utils.checkpoint.checkpoint()包装器,默认设置use_reentrant=False,除非环境变量TIMM_REENTRANT_CKPT=1被设置。
2024年12月31日
convnext_nano384x384 ImageNet-12k预训练及微调模型。https://huggingface.co/models?search=convnext_nano%20r384- 新增来自https://github.com/apple/ml-aim的AIM-v2编码器,可在Hub上查看:https://huggingface.co/models?search=timm%20aimv2
- 将来自https://github.com/google-research/big_vision的PaliGemma2编码器添加到现有的PaliGemma中,可在Hub上查看:https://huggingface.co/models?search=timm%20pali2
- 补齐缺失的L/14 DFN2B 39B CLIP ViT,即
vit_large_patch14_clip_224.dfn2b_s39b - 修复现有的
RmsNorm层及函数,使其符合标准公式,尽可能使用PT 2.5的实现。将旧实现移至SimpleNorm层,该层为LN,但不含中心化或偏置。此前仅有两台timm模型使用它,现已完成更新。 - 允许覆盖模型创建时的
cache_dir参数。 - 将
trust_remote_code传递给HF数据集包装器。 - 创作者新增了
inception_next_atto模型。 - 提醒注意Adan优化器以及Lamb解耦合权重衰减选项。
- 由https://github.com/brianhou0208修复了一些feature_info元数据。
- 所有使用加载时重新映射的OpenCLIP和JAX(CLIP、SigLIP、Pali等)模型权重均已分配独立的HF Hub实例,以便通过
hf-hub:方式加载,从而与新的TransformersTimmWrapperModel兼容。
简介
PyTorch Image Models (timm) 是一个包含图像模型、层、工具、优化器、调度器、数据加载器/增强以及参考训练/验证脚本的集合,旨在汇集各种最先进的模型,并具备重现ImageNet训练结果的能力。
此处包含了众多他人的工作成果。我已尽力确保所有来源材料均在README、文档和代码注释中通过GitHub、arXiv论文等链接予以注明。如有遗漏,请随时告知我。
功能
模型
所有模型架构系列均包含带有预训练权重的变体。也有一些特定的模型变体未附带任何权重,这并非错误。我们始终欢迎帮助训练新的或更好的权重。
- 聚合嵌套Transformer - https://arxiv.org/abs/2105.12723
- BEiT - https://arxiv.org/abs/2106.08254
- BEiT-V2 - https://arxiv.org/abs/2208.06366
- BEiT3 - https://arxiv.org/abs/2208.10442
- 大迁移ResNetV2 (BiT) - https://arxiv.org/abs/1912.11370
- 瓶颈Transformer - https://arxiv.org/abs/2101.11605
- CaiT(图像Transformer中的类别注意力) - https://arxiv.org/abs/2103.17239
- CoaT(协同尺度卷积-注意力图像Transformer) - https://arxiv.org/abs/2104.06399
- CoAtNet(卷积与注意力) - https://arxiv.org/abs/2106.04803
- ConvNeXt - https://arxiv.org/abs/2201.03545
- ConvNeXt-V2 - http://arxiv.org/abs/2301.00808
- ConViT(具有软卷积归纳偏置的视觉Transformer) - https://arxiv.org/abs/2103.10697
- CspNet(跨阶段部分网络) - https://arxiv.org/abs/1911.11929
- DeiT - https://arxiv.org/abs/2012.12877
- DeiT-III - https://arxiv.org/pdf/2204.07118.pdf
- DenseNet - https://arxiv.org/abs/1608.06993
- DLA - https://arxiv.org/abs/1707.06484
- DPN(双路径网络) - https://arxiv.org/abs/1707.01629
- EdgeNeXt - https://arxiv.org/abs/2206.10589
- EfficientFormer - https://arxiv.org/abs/2206.01191
- EfficientFormer-V2 - https://arxiv.org/abs/2212.08059
- EfficientNet(MBConvNet家族)
- EfficientNet NoisyStudent(B0-B7,L2) - https://arxiv.org/abs/1911.04252
- EfficientNet AdvProp(B0-B8) - https://arxiv.org/abs/1911.09665
- EfficientNet(B0-B7) - https://arxiv.org/abs/1905.11946
- EfficientNet-EdgeTPU(S、M、L) - https://ai.googleblog.com/2019/08/efficientnet-edgetpu-creating.html
- EfficientNet V2 - https://arxiv.org/abs/2104.00298
- FBNet-C - https://arxiv.org/abs/1812.03443
- MixNet - https://arxiv.org/abs/1907.09595
- MNASNet B1、A1(挤压-激励)以及Small - https://arxiv.org/abs/1807.11626
- MobileNet-V2 - https://arxiv.org/abs/1801.04381
- 单路径NAS - https://arxiv.org/abs/1904.02877
- TinyNet - https://arxiv.org/abs/2010.14819
- EfficientViT(MIT) - https://arxiv.org/abs/2205.14756
- EfficientViT(MSRA) - https://arxiv.org/abs/2305.07027
- EVA - https://arxiv.org/abs/2211.07636
- EVA-02 - https://arxiv.org/abs/2303.11331
- FasterNet - https://arxiv.org/abs/2303.03667
- FastViT - https://arxiv.org/abs/2303.14189
- FlexiViT - https://arxiv.org/abs/2212.08013
- FocalNet(焦点调制网络) - https://arxiv.org/abs/2203.11926
- GCViT(全局上下文视觉Transformer) - https://arxiv.org/abs/2206.09959
- GhostNet - https://arxiv.org/abs/1911.11907
- GhostNet-V2 - https://arxiv.org/abs/2211.12905
- GhostNet-V3 - https://arxiv.org/abs/2404.11202
- gMLP - https://arxiv.org/abs/2105.08050
- GPU高效网络 - https://arxiv.org/abs/2006.14090
- Halo Nets - https://arxiv.org/abs/2103.12731
- HGNet / HGNet-V2 - 待定
- HRNet - https://arxiv.org/abs/1908.07919
- InceptionNeXt - https://arxiv.org/abs/2303.16900
- Inception-V3 - https://arxiv.org/abs/1512.00567
- Inception-ResNet-V2和Inception-V4 - https://arxiv.org/abs/1602.07261
- Lambda Networks - https://arxiv.org/abs/2102.08602
- LeViT(以卷积网络形式出现的视觉Transformer) - https://arxiv.org/abs/2104.01136
- MambaOut - https://arxiv.org/abs/2405.07992
- MaxViT(多轴视觉Transformer) - https://arxiv.org/abs/2204.01697
- MetaFormer(PoolFormer-v2、ConvFormer、CAFormer) - https://arxiv.org/abs/2210.13452
- MLP-Mixer - https://arxiv.org/abs/2105.01601
- MobileCLIP - https://arxiv.org/abs/2311.17049
- MobileNet-V3(带高效头部的MBConvNet) - https://arxiv.org/abs/1905.02244
- FBNet-V3 - https://arxiv.org/abs/2006.02049
- HardCoRe-NAS - https://arxiv.org/abs/2102.11646
- LCNet - https://arxiv.org/abs/2109.15099
- MobileNetV4 - https://arxiv.org/abs/2404.10518
- MobileOne - https://arxiv.org/abs/2206.04040
- MobileViT - https://arxiv.org/abs/2110.02178
- MobileViT-V2 - https://arxiv.org/abs/2206.02680
- MViT-V2(改进型多尺度视觉Transformer) - https://arxiv.org/abs/2112.01526
- NASNet-A - https://arxiv.org/abs/1707.07012
- NesT - https://arxiv.org/abs/2105.12723
- Next-ViT - https://arxiv.org/abs/2207.05501
- NFNet-F - https://arxiv.org/abs/2102.06171
- NF-RegNet / NF-ResNet - https://arxiv.org/abs/2101.08692
- PE(感知编码器) - https://arxiv.org/abs/2504.13181
- PNasNet - https://arxiv.org/abs/1712.00559
- PoolFormer(MetaFormer) - https://arxiv.org/abs/2111.11418
- 基于池化的视觉Transformer(PiT) - https://arxiv.org/abs/2103.16302
- PVT-V2(改进型金字塔视觉Transformer) - https://arxiv.org/abs/2106.13797
- RDNet(重装版DenseNet) - https://arxiv.org/abs/2403.19588
- RegNet - https://arxiv.org/abs/2003.13678
- RegNetZ - https://arxiv.org/abs/2103.06877
- RepVGG - https://arxiv.org/abs/2101.03697
- RepGhostNet - https://arxiv.org/abs/2211.06088
- RepViT - https://arxiv.org/abs/2307.09283
- ResMLP - https://arxiv.org/abs/2105.03404
- ResNet/ResNeXt
- ResNet(v1b/v1.5) - https://arxiv.org/abs/1512.03385
- ResNeXt - https://arxiv.org/abs/1611.05431
- “技巧包”/Gluon C、D、E、S变体 - https://arxiv.org/abs/1812.01187
- 弱监督(WSL)Instagram预训练/ImageNet调优的ResNeXt101 - https://arxiv.org/abs/1805.00932
- 半监督(SSL)/半弱监督(SWSL)ResNet/ResNeXts - https://arxiv.org/abs/1905.00546
- ECA-Net(ECAResNet) - https://arxiv.org/abs/1910.03151v4
- 挤压-激励网络(SEResNet) - https://arxiv.org/abs/1709.01507
- ResNet-RS - https://arxiv.org/abs/2103.07579
- Res2Net - https://arxiv.org/abs/1904.01169
- ResNeSt - https://arxiv.org/abs/2004.08955
- ReXNet - https://arxiv.org/abs/2007.00992
- ROPE-ViT - https://arxiv.org/abs/2403.13298
- SelecSLS - https://arxiv.org/abs/1907.00837
- 选择性核网络 - https://arxiv.org/abs/1903.06586
- Sequencer2D - https://arxiv.org/abs/2205.01972
- SHViT - https://arxiv.org/abs/2401.16456
- SigLIP(图像编码器) - https://arxiv.org/abs/2303.15343
- SigLIP 2(图像编码器) - https://arxiv.org/abs/2502.14786
- StarNet - https://arxiv.org/abs/2403.19967
- SwiftFormer - https://arxiv.org/pdf/2303.15446
- Swin S3(AutoFormerV2) - https://arxiv.org/abs/2111.14725
- Swin Transformer - https://arxiv.org/abs/2103.14030
- Swin Transformer V2 - https://arxiv.org/abs/2111.09883
- TinyViT - https://arxiv.org/abs/2207.10666
- Transformer嵌套Transformer(TNT) - https://arxiv.org/abs/2103.00112
- TResNet - https://arxiv.org/abs/2003.13630
- Twins(视觉Transformer中的空间注意力) - https://arxiv.org/pdf/2104.13840.pdf
- VGG - https://arxiv.org/abs/1409.1556
- Visformer - https://arxiv.org/abs/2104.12533
- 视觉Transformer - https://arxiv.org/abs/2010.11929
- ViTamin - https://arxiv.org/abs/2404.02132
- VOLO(视觉展望者) - https://arxiv.org/abs/2106.13112
- VovNet V2和V1 - https://arxiv.org/abs/1911.06667
- Xception - https://arxiv.org/abs/1610.02357
- Xception(改良对齐版,Gluon) - https://arxiv.org/abs/1802.02611
- Xception(改良对齐版,TF) - https://arxiv.org/abs/1802.02611
- XCiT(交叉协方差图像Transformer) - https://arxiv.org/abs/2106.09681
Optimizers
To see full list of optimizers w/ descriptions: timm.optim.list_optimizers(with_description=True)
Included optimizers available via timm.optim.create_optimizer_v2 factory method:
adabeliefan implementation of AdaBelief adapted from https://github.com/juntang-zhuang/Adabelief-Optimizer - https://arxiv.org/abs/2010.07468adafactoradapted from FAIRSeq impl - https://arxiv.org/abs/1804.04235adafactorbvadapted from Big Vision - https://arxiv.org/abs/2106.04560adahessianby David Samuel - https://arxiv.org/abs/2006.00719adampandsgdpby Naver ClovAI - https://arxiv.org/abs/2006.08217adamuonandnadamuonas per https://github.com/Chongjie-Si/AdaMuon - https://arxiv.org/abs/2507.11005adanan implementation of Adan adapted from https://github.com/sail-sg/Adan - https://arxiv.org/abs/2208.06677adoptADOPT adapted from https://github.com/iShohei220/adopt - https://arxiv.org/abs/2411.02853kronPSGD w/ Kronecker-factored preconditioner from https://github.com/evanatyourservice/kron_torch - https://sites.google.com/site/lixilinx/home/psgdlamban implementation of Lamb and LambC (w/ trust-clipping) cleaned up and modified to support use with XLA - https://arxiv.org/abs/1904.00962lapropoptimizer from https://github.com/Z-T-WANG/LaProp-Optimizer - https://arxiv.org/abs/2002.04839larsan implementation of LARS and LARC (w/ trust-clipping) - https://arxiv.org/abs/1708.03888lionand implementation of Lion adapted from https://github.com/google/automl/tree/master/lion - https://arxiv.org/abs/2302.06675lookaheadadapted from impl by Liam - https://arxiv.org/abs/1907.08610madgradan implementation of MADGRAD adapted from https://github.com/facebookresearch/madgrad - https://arxiv.org/abs/2101.11075marsMARS optimizer from https://github.com/AGI-Arena/MARS - https://arxiv.org/abs/2411.10438muonMUON optimizer from https://github.com/KellerJordan/Muon with numerous additions and improved non-transformer behaviournadaman implementation of Adam w/ Nesterov momentumnadamwan implementation of AdamW (Adam w/ decoupled weight-decay) w/ Nesterov momentum. A simplified impl based on https://github.com/mlcommons/algorithmic-efficiencynovogradby Masashi Kimura - https://arxiv.org/abs/1905.11286radamby Liyuan Liu - https://arxiv.org/abs/1908.03265rmsprop_tfadapted from PyTorch RMSProp by myself. Reproduces much improved Tensorflow RMSProp behavioursgdwand implementation of SGD w/ decoupled weight-decayfused<name>optimizers by name with NVIDIA Apex installedbnb<name>optimizers by name with BitsAndBytes installedcadamw,clion, and more 'Cautious' optimizers from https://github.com/kyleliang919/C-Optim - https://arxiv.org/abs/2411.16085adam,adamw,rmsprop,adadelta,adagrad, andsgdpass through totorch.optimimplementationscsuffix (egadamc,nadamcto implement 'corrected weight decay' in https://arxiv.org/abs/2506.02285)
Augmentations
- Random Erasing from Zhun Zhong - https://arxiv.org/abs/1708.04896)
- Mixup - https://arxiv.org/abs/1710.09412
- CutMix - https://arxiv.org/abs/1905.04899
- AutoAugment (https://arxiv.org/abs/1805.09501) and RandAugment (https://arxiv.org/abs/1909.13719) ImageNet configurations modeled after impl for EfficientNet training (https://github.com/tensorflow/tpu/blob/master/models/official/efficientnet/autoaugment.py)
- AugMix w/ JSD loss, JSD w/ clean + augmented mixing support works with AutoAugment and RandAugment as well - https://arxiv.org/abs/1912.02781
- SplitBachNorm - allows splitting batch norm layers between clean and augmented (auxiliary batch norm) data
Regularization
- DropPath aka "Stochastic Depth" - https://arxiv.org/abs/1603.09382
- DropBlock - https://arxiv.org/abs/1810.12890
- Blur Pooling - https://arxiv.org/abs/1904.11486
Other
Several (less common) features that I often utilize in my projects are included. Many of their additions are the reason why I maintain my own set of models, instead of using others' via PIP:
- All models have a common default configuration interface and API for
- accessing/changing the classifier -
get_classifierandreset_classifier - doing a forward pass on just the features -
forward_features(see documentation) - these makes it easy to write consistent network wrappers that work with any of the models
- accessing/changing the classifier -
- All models support multi-scale feature map extraction (feature pyramids) via create_model (see documentation)
create_model(name, features_only=True, out_indices=..., output_stride=...)out_indicescreation arg specifies which feature maps to return, these indices are 0 based and generally correspond to theC(i + 1)feature level.output_stridecreation arg controls output stride of the network by using dilated convolutions. Most networks are stride 32 by default. Not all networks support this.- feature map channel counts, reduction level (stride) can be queried AFTER model creation via the
.feature_infomember
- All models have a consistent pretrained weight loader that adapts last linear if necessary, and from 3 to 1 channel input if desired
- High performance reference training, validation, and inference scripts that work in several process/GPU modes:
- NVIDIA DDP w/ a single GPU per process, multiple processes with APEX present (AMP mixed-precision optional)
- PyTorch DistributedDataParallel w/ multi-gpu, single process (AMP disabled as it crashes when enabled)
- PyTorch w/ single GPU single process (AMP optional)
- A dynamic global pool implementation that allows selecting from average pooling, max pooling, average + max, or concat([average, max]) at model creation. All global pooling is adaptive average by default and compatible with pretrained weights.
- A 'Test Time Pool' wrapper that can wrap any of the included models and usually provides improved performance doing inference with input images larger than the training size. Idea adapted from original DPN implementation when I ported (https://github.com/cypw/DPNs)
- Learning rate schedulers
- Ideas adopted from
- AllenNLP schedulers
- FAIRseq lr_scheduler
- SGDR: Stochastic Gradient Descent with Warm Restarts (https://arxiv.org/abs/1608.03983)
- Schedulers include
step,cosinew/ restarts,tanhw/ restarts,plateau
- Ideas adopted from
- Space-to-Depth by mrT23 (https://arxiv.org/abs/1801.04590)
- Adaptive Gradient Clipping (https://arxiv.org/abs/2102.06171, https://github.com/deepmind/deepmind-research/tree/master/nfnets)
- An extensive selection of channel and/or spatial attention modules:
- Bottleneck Transformer - https://arxiv.org/abs/2101.11605
- CBAM - https://arxiv.org/abs/1807.06521
- Effective Squeeze-Excitation (ESE) - https://arxiv.org/abs/1911.06667
- Efficient Channel Attention (ECA) - https://arxiv.org/abs/1910.03151
- Gather-Excite (GE) - https://arxiv.org/abs/1810.12348
- Global Context (GC) - https://arxiv.org/abs/1904.11492
- Halo - https://arxiv.org/abs/2103.12731
- Involution - https://arxiv.org/abs/2103.06255
- Lambda Layer - https://arxiv.org/abs/2102.08602
- Non-Local (NL) - https://arxiv.org/abs/1711.07971
- Squeeze-and-Excitation (SE) - https://arxiv.org/abs/1709.01507
- Selective Kernel (SK) - (https://arxiv.org/abs/1903.06586
- Split (SPLAT) - https://arxiv.org/abs/2004.08955
- Shifted Window (SWIN) - https://arxiv.org/abs/2103.14030
Results
Model validation results can be found in the results tables
Getting Started (Documentation)
The official documentation can be found at https://huggingface.co/docs/hub/timm. Documentation contributions are welcome.
Getting Started with PyTorch Image Models (timm): A Practitioner’s Guide by Chris Hughes is an extensive blog post covering many aspects of timm in detail.
timmdocs is an alternate set of documentation for timm. A big thanks to Aman Arora for his efforts creating timmdocs.
paperswithcode is a good resource for browsing the models within timm.
Train, Validation, Inference Scripts
The root folder of the repository contains reference train, validation, and inference scripts that work with the included models and other features of this repository. They are adaptable for other datasets and use cases with a little hacking. See documentation.
Awesome PyTorch Resources
One of the greatest assets of PyTorch is the community and their contributions. A few of my favourite resources that pair well with the models and components here are listed below.
Object Detection, Instance and Semantic Segmentation
- Detectron2 - https://github.com/facebookresearch/detectron2
- Segmentation Models (Semantic) - https://github.com/qubvel/segmentation_models.pytorch
- EfficientDet (Obj Det, Semantic soon) - https://github.com/rwightman/efficientdet-pytorch
Computer Vision / Image Augmentation
- Albumentations - https://github.com/albumentations-team/albumentations
- Kornia - https://github.com/kornia/kornia
Knowledge Distillation
- RepDistiller - https://github.com/HobbitLong/RepDistiller
- torchdistill - https://github.com/yoshitomo-matsubara/torchdistill
Metric Learning
- PyTorch Metric Learning - https://github.com/KevinMusgrave/pytorch-metric-learning
Training / Frameworks
- fastai - https://github.com/fastai/fastai
- lightly_train - https://github.com/lightly-ai/lightly-train
Deployment
- timmx (Export timm models to ONNX, CoreML, LiteRT, TensorRT, and more) - https://github.com/Boulaouaney/timmx
Licenses
Code
The code here is licensed Apache 2.0. I've taken care to make sure any third party code included or adapted has compatible (permissive) licenses such as MIT, BSD, etc. I've made an effort to avoid any GPL / LGPL conflicts. That said, it is your responsibility to ensure you comply with licenses here and conditions of any dependent licenses. Where applicable, I've linked the sources/references for various components in docstrings. If you think I've missed anything please create an issue.
预训练权重
到目前为止,此处提供的所有预训练权重均是在 ImageNet 数据集上进行预训练的,其中仅有少数几个还进行了额外的预训练(详见下方的附加说明)。ImageNet 数据集仅面向非商业研究目的发布(https://image-net.org/download)。关于使用该数据集的预训练权重可能带来的法律影响尚不明确。我使用 ImageNet 训练的所有模型均出于研究目的,因此应假定原始数据集的许可协议同样适用于这些权重。如果您打算在商业产品中使用这些预训练权重,最好咨询法律意见。
不仅在 ImageNet 上预训练
此处包含或引用的若干权重是在我无法访问的专有数据集上进行预训练的。其中包括 Facebook 的 WSL、SSL、SWSL ResNe(Xt) 以及 Google 的 Noisy Student EfficientNet 模型。Facebook 的模型具有明确的非商业许可(CC-BY-NC 4.0,https://github.com/facebookresearch/semi-supervised-ImageNet1K-models,https://github.com/facebookresearch/WSL-Images)。而 Google 的模型似乎除了 Apache 2.0 许可证之外并无其他限制(当然也需考虑 ImageNet 相关问题)。无论哪种情况,如有任何疑问,您都应直接联系 Facebook 或 Google。
引用
BibTeX
@misc{rw2019timm,
author = {Ross Wightman},
title = {PyTorch 图像模型},
year = {2019},
publisher = {GitHub},
journal = {GitHub 仓库},
doi = {10.5281/zenodo.4414861},
howpublished = {\url{https://github.com/rwightman/pytorch-image-models}}
}
最新 DOI
版本历史
v1.0.262026/03/23v1.0.252026/02/23v1.0.242026/01/07v1.0.232026/01/05v1.0.222025/11/05v1.0.212025/10/24v1.0.202025/09/21v1.0.192025/07/24v1.0.182025/07/23v1.0.172025/07/10v1.0.162025/06/26v1.0.152025/02/23v1.0.142025/01/19v1.0.132025/01/09v1.0.122024/12/03v1.0.112024/10/16v1.0.102024/10/15v1.0.92024/08/23v1.0.82024/07/29v1.0.72024/06/19常见问题
相似工具推荐
stable-diffusion-webui
stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面,旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点,将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。 无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师,还是想要深入探索模型潜力的开发者与研究人员,都能从中获益。其核心亮点在于极高的功能丰富度:不仅支持文生图、图生图、局部重绘(Inpainting)和外绘(Outpainting)等基础模式,还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外,它内置了 GFPGAN 和 CodeFormer 等人脸修复工具,支持多种神经网络放大算法,并允许用户通过插件系统无限扩展能力。即使是显存有限的设备,stable-diffusion-webui 也提供了相应的优化选项,让高质量的 AI 艺术创作变得触手可及。
everything-claude-code
everything-claude-code 是一套专为 AI 编程助手(如 Claude Code、Codex、Cursor 等)打造的高性能优化系统。它不仅仅是一组配置文件,而是一个经过长期实战打磨的完整框架,旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。 通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能,everything-claude-code 能显著提升 AI 在复杂任务中的表现,帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略,使得模型响应更快、成本更低,同时有效防御潜在的攻击向量。 这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库,还是需要 AI 协助进行安全审计与自动化测试,everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目,它融合了多语言支持与丰富的实战钩子(hooks),让 AI 真正成长为懂上
ComfyUI
ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎,专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式,采用直观的节点式流程图界面,让用户通过连接不同的功能模块即可构建个性化的生成管线。 这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景,也能自由组合模型、调整参数并实时预览效果,轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性,不仅支持 Windows、macOS 和 Linux 全平台,还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构,并率先支持 SDXL、Flux、SD3 等前沿模型。 无论是希望深入探索算法潜力的研究人员和开发者,还是追求极致创作自由度的设计师与资深 AI 绘画爱好者,ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能,使其成为当前最灵活、生态最丰富的开源扩散模型工具之一,帮助用户将创意高效转化为现实。
NextChat
NextChat 是一款轻量且极速的 AI 助手,旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性,以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发,NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。 这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言,它也提供了便捷的自托管方案,支持一键部署到 Vercel 或 Zeabur 等平台。 NextChat 的核心亮点在于其广泛的模型兼容性,原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型,让用户在一个界面即可自由切换不同 AI 能力。此外,它还率先支持 MCP(Model Context Protocol)协议,增强了上下文处理能力。针对企业用户,NextChat 提供专业版解决方案,具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能,满足公司对数据隐私和个性化管理的高标准要求。
ML-For-Beginners
ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程,旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周,包含 26 节精炼课程和 52 道配套测验,内容涵盖从基础概念到实际应用的完整流程,有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。 无论是希望转型的开发者、需要补充算法背景的研究人员,还是对人工智能充满好奇的普通爱好者,都能从中受益。课程不仅提供了清晰的理论讲解,还强调动手实践,让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持,通过自动化机制提供了包括简体中文在内的 50 多种语言版本,极大地降低了全球不同背景用户的学习门槛。此外,项目采用开源协作模式,社区活跃且内容持续更新,确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路,ML-For-Beginners 将是理想的起点。
ragflow
RAGFlow 是一款领先的开源检索增强生成(RAG)引擎,旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体(Agent)能力相结合,不仅支持从各类文档中高效提取知识,还能让模型基于这些知识进行逻辑推理和任务执行。 在大模型应用中,幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构(如表格、图表及混合排版),显著提升了信息检索的准确度,从而有效减少模型“胡编乱造”的现象,确保回答既有据可依又具备时效性。其内置的智能体机制更进一步,使系统不仅能回答问题,还能自主规划步骤解决复杂问题。 这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统,还是致力于探索大模型在垂直领域落地的创新者,都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口,既降低了非算法背景用户的上手门槛,也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目,它正成为连接通用大模型与行业专有知识之间的重要桥梁。