onnxruntime

microsoftMIT活跃维护

跨平台高性能推理与训练加速引擎,可直接加载 ONNX 模型,兼容 PyTorch、TensorFlow 等框架导出,解决模型在不同硬件上高效部署的问题。

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

v1.30.1发布于 2026-10-29 22:01 UTC22,271star +11 / 7 天4,431fork同步于 2026-11-10 05:22 UTC

怎么上手

由 README 提炼,执行前请确认
README 未给出安装命令,请参考 https://onnxruntime.ai/docs 获取安装与使用方式
硬件要求按 README 说明

README 未说明具体显存要求;训练加速部分提到多节点 NVIDIA GPU,推理侧仅说明兼容不同硬件、驱动和操作系统,未列出具体 GPU 厂商或型号。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

跨平台机器学习推理与训练加速器,让 PyTorch、TensorFlow 等模型跑得更快更省

跨平台高性能推理与训练加速引擎,可直接加载 ONNX 模型,兼容 PyTorch、TensorFlow 等框架导出,解决模型在不同硬件上高效部署的问题。

核心能力

  • 支持 PyTorch、TensorFlow/Keras 及 scikit-learn、LightGBM、XGBoost 等模型
  • 通过图优化与变换并结合硬件加速器提升推理性能
  • 兼容多种硬件、驱动和操作系统
  • 训练侧可在多节点 NVIDIA GPU 上加速 transformer 模型训练
  • 现有 PyTorch 训练脚本加一行即可接入训练加速

容易踩的坑

README 未说明安装步骤,需自行查阅官方文档确认对应语言包与硬件后端;训练加速依赖 NVIDIA GPU 多节点环境;项目可能收集使用数据并发送至 Microsoft,详见隐私声明

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v1.30.1
  1. v1.30.1ONNX Runtime v1.30.1最新正式版2026-10-29 · 2026-10-29 22:01 UTC

    This is a patch release on top of v1.30.0, containing targeted model-validation and memory-safety fixes, improved Plugin EP data transfers, and build and packaging fixes.

    Highlights

    Bug Fixes

    • Hardened contrib-op shape inference with additional rank, attribute, initializer, and overflow validation for CausalConvWithState, GatedDeltaNet, GroupQueryAttention, and SparseAttention (#32607).
    • Prevented out-of-bounds reads in EmbedLayerNormalization shape inference with scalar beta, ConvTransposeWithDynamicPads, and shape-inference input-data lookup (#32610, #32679, #32681).
    • Rejected malformed graphs containing inputs to zero-input operator schemas or subgraphs on non-control-flow nodes (#32633, #32641).
    • Prevented an out-of-bounds read during session initialization when a Loop or Scan body input is also an initializer, rejecting the invalid graph instead of crashing (#32609).
    • Fixed a heap buffer overflow caused by reusing packed sub-byte tensor storage for a larger full-byte tensor (#32611).
    • Preserved the caller's execution stream in Plugin EP single-tensor data transfers, allowing asynchronous copies to receive the supplied stream while retaining synchronous-copy behavior (#32666).

    Build and Packaging

    • Fixed Windows build-tools setup to use system-trusted certificates and improved proxy handling (#33142).
    • Selected Python 3.12 explicitly before package validation in the combined packaging stage (#33561).
    • Restricted FP8 XQA test cases to supported GPU compute capabilities (#32559).

    Contributors

    Thanks to our 8 contributors for this release!

    @adrastogi, @bbernhar, @eserscor, @miaobin, @shiyi9801, @tianleiwu, @wangw-1991, @xiaofeihan1

    Full Changelog: v1.30.0...v1.30.1

    These release notes were drafted with AI assistance.

  2. plugin-ep-webgpu/v0.5.0ONNX Runtime WebGPU Plugin EP v0.5.02026-10-29 · 2026-10-29 21:30 UTC
    查看更新说明

    ONNX Runtime WebGPU Plugin EP 0.5.0 expands attention, mixture-of-experts, and quantized operator support, improves GPU kernel performance, and strengthens runtime integration and correctness.

    Highlights

    Performance

    • Enabled subgroup-matrix kernels on AMD GPUs (#32667).
    • Added an FP16 GEMV specialization for single-row decode projections (#33070).
    • Improved data movement in Concat, Slice, Transpose, and pooling, and vectorized NHWC depthwise convolution across channels (#32497, #32498).
    • Enabled local-window flash attention for GroupQueryAttention (#32462).
    • Optimized recurrent and chunked GatedDeltaNet execution (#32645, #33143).
    • Optimized sparse attention indexers and SparsePagedAttention softmax, and cached sparse-indexer QSA visibility and scores (#32613, #32656, #33017).

    Operator and Model Support

    • Added native GatedDeltaNet and VarlenCausalConvWithState kernels, including subsequent state-update-capacity support for GatedDeltaNet (#32510, #32477, #32767).
    • Added SparseAttentionIndexer, DynamicSparseAttention, and SparsePagedAttention, plus a packed sparse attention indexer for continuous batching (#32528, #32529, #32533, #32618).
    • Extended PagedAttention with full-context and local non-causal attention, and per-head Q/K normalization (#32763, #32792, #32808).
    • Added unquantized MoE and expanded QMoE activation, gating, routing, and packed-input support (#32447).
    • Added block-scaled FP8 QMoE, INT2 expert weights, and mixed-width integer QMoE execution (#32794, #32878).
    • Added Qwen4-Exp Engram support and VarlenNGramHashMapping for packed and variable-length batching (#32285, #32358, #32467).
    • Extended GatherBlockQuantized to FP8 and FP4 data. Out-of-range indices now produce zero output slices for both floating-point and existing integer formats (#32480).
    • Added GroupNorm, SkipGroupNorm, and 3D ConvTranspose support (#32463, #32688).
    • Added weightless hyper-connection primitives: BranchwiseRMSNorm, ScaledSiLU, HyperConnectionPreMix, and HyperConnectionPostMix (#32687).
    • Added SiLU/Swish/Sigmoid activation modes to GatedRMSNorm and QuickGelu fusion in the im2col-matmul convolution path (#32512, [#32560](https://github.com/microsoft/onnxruntim
  3. v1.31.1ONNX Runtime v1.31.12026-10-26 · 2026-10-26 19:29 UTC
    查看更新说明

    ONNX Runtime 1.31.1 is a patch release that fixes an OpenVINO-enabled Python build regression and corrects WASM Debug external-data tests. These notes cover changes since ONNX Runtime 1.31.0.

    Highlights

    • Fixed a provider-info namespace mismatch that caused compilation failures when building with both OpenVINO and Python enabled (#33327).
    • Fixed WASM Debug test failures by skipping file-backed external-data cases unsupported by the WASM test module, while retaining compile-output checks, buffer-destination coverage, and native test coverage. This is a test-only change and does not change runtime behavior (#33226).

    Contributors

    Thanks to our 3 human contributors for this release!

    @eserscor, @mustjab, @tianleiwu

    Full Changelog: rel-1.31.0...rel-1.31.1

    Release highlights were prepared with AI assistance.

  4. v1.31.0ONNX Runtime v1.31.02026-10-09 · 2026-10-09 04:51 UTC
    查看更新说明

    ONNX Runtime 1.31.0 stabilizes model-package and EPContext data APIs, improves CPU model loading and quantized MoE inference, expands device-based execution-provider selection, and strengthens model-loading and runtime reliability. These notes cover changes since ONNX Runtime 1.30.0. CUDA and WebGPU kernel updates are summarized here; detailed provider notes are covered by their separate plugin EP releases.

    Highlights

    • Promoted the model-package API and EPContext data callbacks to stable C and C++ APIs, with EPContext callback support added across language bindings (#33166, #32265).
    • Reduced CPU session-initialization overhead by parallelizing eligible weight prepacking, and accelerated block-wise INT4/INT8 QMoE experts with MLAS QNBit kernels and grouped expert dispatch (#31691, #32644, #32668).
    • Added x86 FP16 LayerNorm/RMSNorm acceleration, Arm KleidiAI SVE2.1 FP16 GEMM support, and additional RISC-V vector kernels (#32715, #32670, #32710).
    • Enabled CoreML participation in device-based EP selection, including Apple Neural Engine selection through PREFER_NPU (#31975).
    • Added workspace-memory accounting and verification for constrained-memory graph partitioning, alongside broader model, graph, and tensor validation (#31962, #32189).

    Announcements & Compatibility

    • CUDA Plugin EP v0.3.0 and WebGPU Plugin EP v0.5.0 are matched with ONNX Runtime 1.31.0. For contrib-op compatibility, core and the plugin must use the same contributed-operator schemas; building both from the same ONNX Runtime revision is recommended. Schema mismatches can cause incorrect execution or crashes and may not be detected during plugin registration.
    • GatherBlockQuantized behavior change: out-of-range indices now produce zero output slices across CPU, CUDA, and WebGPU for both integer and floating-point quantized formats. This deliberately differs from ONNX Gather error semantics (#32480).
    • Experimental API migration: model-package consumers should use OrtApi::GetModelPackageApi and the stable OrtModelPackageApi table. EPContext callback registration now uses stable APIs; the corresponding experimental lookup entries were removed. The stable native callback contract carries callback/state pointers, with payload limits enforced by application callbacks, bindings, or EPs rather than a native read-options policy (#33166, #32265).
    • ACL EP is deprecated and will be removed in a future release. Source builds using --use_acl now receive a deprecation warning (#32564).
    • The ONNX dependency remains at 1.22.0. The initial ONNX 1.23 integration was reverted pending upstream fixes; this release does not ship that integration's new opset or FLOAT6 support (#33073).
    • Supported native builds now default to 1DS telemetry. Windows TraceLogging remains selectable with --use_windows_telemetry or onnxruntime_USE_WINDOWS_TELEMETRY=ON; telemetry can be disabled with --no_telemetry (#32384).

    New F

  5. plugin-ep-cuda/v0.3.0ONNX Runtime CUDA Plugin EP 0.3.02026-10-09 · 2026-10-09 00:49 UTC
    查看更新说明

    This release brings sparse attention and packed continuous-batching support, INT2 and mixed-width QMoE execution, decode-kernel tuning, and reliability fixes to the ONNX Runtime CUDA Plugin EP. Highlights include new QSA/CSA attention operators, expanded paged speculative decoding, opt-in MatMul auto-tuning, and improved MXFP4 support on Blackwell consumer GPUs.

    Compatibility

    The minimum ONNX Runtime core version remains 1.24.4, but meeting that minimum alone does not guarantee compatibility for contributed operators. Core and the plugin must use the same contributed-operator schemas; building both from the same ONNX Runtime revision is recommended. Schema mismatches can cause incorrect execution or crashes and may not be detected when registering the plugin (#32855).

    The matched ONNX Runtime version is 1.31.0 for this release.

    Highlights

    Plugin Runtime and CUDA Graphs

    • Added checked GroupQueryAttention workspace recipes for KV-cache preparation and XQA, FlashAttention, memory-efficient, and unfused routes, plus conservative workspace estimation for resource-constrained graph partitioning. cuDNN workspace is reported as unavailable rather than incorrectly estimated as zero (#32446, #32453, #32454, #32617).
    • Bounded sliding-window GQA workspace by the resident or staged KV extent rather than the unbounded absolute sequence length, and consolidated runtime scratch sizing and sequence-length-independent route eligibility into shared helpers (#32602, #32945, #33001).
    • Replaced eligible decode-path memset operations with small clearing kernels for fpA_intB split-K semaphores, paged XQA semaphores, and compact convolution state updates, reducing CUDA Graph dependency overhead (#32884).
    • Replaced shared ones-buffer bias broadcasts in Gemm and DecoderAttention with direct broadcasts on the consuming CUDA stream, removed the constant-ones cache, and corrected zero-K Gemm bias scaling (#32852).

    Attention and KV Caching

    • Added a cuDNN paged SDPA decode tier to PagedAttention for eligible FP16/BF16 causal workloads with unquantized KV caches. It is selected ahead of FlashAttention when XQA is not the winner, automatically considered on SM90+, and can be disabled with ORT_ENABLE_CUDNN_FLASH_ATTENTION=0. Follow-up fixes stabilize default-scale cache keys and backend selection during CUDA Graph execution (#32493, #32624).
    • Expanded non-causal PagedAttention beyond FlashAttention, including portable paths for small cache pages and supported XQA speculative paths; added coverage for head size 128 with 16/32/64-token pages and ragged batches (#32619).
    • Added causal paged speculative XQA for FP16 query/output, INT8 KV caches, head size 128, GQA group size 6, and query widths 2-8. Unsupported widths and non-causal H128 workloads retain existing fallbacks (#32740).
    • Documented the block-eviction layout contract for sliding-window GQA caches, including how to index resident tokens after multi-token speculative or chunked-prefill steps (#32419).
    • Allowed GQA to borrow unquantized past K/V without allocating or copying present caches when new K/V is empty and

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ONNX Runtime is a cross-platform inference and training machine-learning accelerator.

    ONNX Runtime inference can enable faster customer experiences and lower costs, supporting models from deep learning frameworks such as PyTorch and TensorFlow/Keras as well as classical machine learning libraries such as scikit-learn, LightGBM, XGBoost, etc. ONNX Runtime is compatible with different hardware, drivers, and operating systems, and provides optimal performance by leveraging hardware accelerators where applicable alongside graph optimizations and transforms. Learn more →

    ONNX Runtime training can accelerate the model training time on multi-node NVIDIA GPUs for transformer models with a one-line addition for existing PyTorch training scripts. Learn more →

    Get Started & Resources

    Releases

    The current release and past releases can be found here: https://github.com/microsoft/onnxruntime/releases.

    For details on the upcoming release, including release dates, announcements, features, and guidance on submitting feature requests, please visit the release roadmap: https://onnxruntime.ai/roadmap.

    Data/Telemetry

    This project may collect usage data and send it to Microsoft to help improve our products and services. See the privacy statement for more details.

    Contributions and Feedback

    We welcome contributions! Please see the contribution guidelines.

    For feature requests or bug reports, please file a GitHub Issue.

    For general discussion or questions, please use GitHub Discussions.

    Code of Conduct

    This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

    License

    This project is licensed under the MIT License.