能力标签
开源推理引擎
🛠
AI工具

开源推理引擎

基于 Rust · 开源免费,本地部署,数据完全自主可控
英文名:openinfer
⭐ 511 Stars 🍴 75 Forks 💻 Rust 📄 Apache-2.0 🏷 AI 8.0分
8.0AI 综合评分
cudagpuinferencerust
✦ AI Skill Hub 推荐

开源推理引擎 是 AI Skill Hub 本期精选AI工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

开源推理引擎 是一款基于 Rust 的开源工具,在 GitHub 上收获 1k+ Star,是cuda、gpu、inference、rust领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
开源推理引擎 依赖 Rust 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 Rust 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 开源推理引擎 的版本更新,及时通知重要功能变化。

📋 工具概览

基于Rust和CUDA的LLM推理引擎,兼容OpenAI

开源推理引擎 是一款基于 Rust 开发的开源工具,专注于 cuda、gpu、inference 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 511
开发语言
Rust
支持平台
Windows / macOS / Linux
维护状态
正常维护,社区驱动
开源协议
Apache-2.0
AI 综合评分
8.0 分
工具类型
AI工具
Forks
75

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

基于Rust和CUDA的LLM推理引擎,兼容OpenAI

开源推理引擎 是一款基于 Rust 开发的开源工具,专注于 cuda、gpu、inference 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:cargo install(推荐)
cargo install openinfer

# 方式二:从源码编译
git clone https://github.com/openinfer-project/openinfer
cd openinfer
cargo build --release
# 二进制在 ./target/release/openinfer
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
openinfer --help

# 基本运行
openinfer [options] <input>

# 详细使用说明请查阅文档
# https://github.com/openinfer-project/openinfer
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# openinfer 配置说明
# 查看配置选项
openinfer --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export OPENINFER_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 52/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<p align="center"> <picture> <source media="(max-width: 600px) and (prefers-color-scheme: dark)" srcset="docs/assets/banner-mobile-dark.svg"> <source media="(max-width: 600px)" srcset="docs/assets/banner-mobile-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="docs/assets/banner-dark.svg"> <img src="docs/assets/banner-light.svg" width="1000" alt="PegaInfer — LLM inference in Rust and CUDA. Built in Rust. Tuned for production inference."> </picture> </p>

<p align="center"> <a href="https://pegainfer.org/"> <img src="https://img.shields.io/badge/Docs%20%26%20Blog-pegainfer.org-2ea44f" alt="Docs and engineering blog"> </a> <a href="https://join.slack.com/t/openinferhq/shared_invite/zt-41scnc53a-d0McNJDjK2lVqFGoSLUgXA"> <img src="https://img.shields.io/badge/Slack-join%20the%20community-4A154B?logo=slack&logoColor=white" alt="Join the PegaInfer Slack"> </a> <a href="LICENSE"> <img src="https://img.shields.io/badge/License-Apache%202.0-475569" alt="Apache 2.0 license"> </a> </p>

<p align="center"> <a href="#quickstart">Quickstart</a> &middot; <a href="#performance">Performance</a> &middot; <a href="#supported-models">Models</a> &middot; <a href="#architecture">Architecture</a> &middot; <a href="#api">API</a> &middot; <a href="#development">Development</a> </p>

PegaInfer serves LLMs through an OpenAI-compatible API. Each model owns its scheduler, state, and kernels; serving and KV infrastructure are shared. No PyTorch or Python runtime.

Build from source

Use the Rust toolchain pinned in rust-toolchain.toml, a CUDA Toolkit with nvcc and cuBLAS, and a compatible NVIDIA driver. The default Qwen3 build needs no Python. Its driver floor is R545 / CUDA 12.3; newer toolkits and model-specific kernels can require a newer driver.

From the repository root, with the checkpoint downloaded:

export CUDA_HOME=/usr/local/cuda
cargo run --release -- --model-path models/Qwen3-4B

Always use --release for GPU builds. The server entrypoint is pegainfer-server; model crates contain the model implementation and diagnostics.

<details> <summary><strong>Feature builds and environment options</strong></summary>

Qwen3.5 uses Triton AOT kernels, requiring Python and Triton at build time:

uv venv
uv pip install triton
export PEGAINFER_TRITON_PYTHON=.venv/bin/python
cargo run --release --features qwen35 -- --model-path models/Qwen3.5-4B
VariablePurpose
CUDA_HOMECUDA Toolkit location; defaults to /usr/local/cuda
PEGAINFER_CUDA_SMTarget GPU architecture when it cannot be detected, e.g. 120
PEGAINFER_TRITON_PYTHONPython interpreter for Qwen3.5 Triton AOT compilation
PEGAINFER_TILELANG_PYTHONPython interpreter for K3 TileLang kernel generation

Other model lines have their own hardware and build requirements; follow the model guides below. Run cargo run --release -- --help for the compiled-in CLI.

</details>

<details> <summary><strong>Windows source builds</strong></summary>

```powershell $env:CUDA_PATH = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.x" cargo run --release -p pegainfer-server -- --model-path models/Qwen3-4B

Qwen3.5 additionally needs Triton at build time

uv venv .venv --python 3.12 uv pip install "triton-windows<3.7" $env:PEGAINFER_TRITON_PYTHON = ".venv\Scripts\python.exe" cargo run --release --features qwen35 -- --model-path models/Qwen3.5-4B ```

</details>

Quickstart

API

Point an OpenAI-compatible client at http://localhost:8000/v1. Both /v1/completions and /v1/chat/completions support streaming.

curl -s http://localhost:8000/v1/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"models/Qwen3-4B","prompt":"The capital of France is","max_tokens":32}'

curl -N http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"models/Qwen3-4B","messages":[{"role":"user","content":"Write a haiku about Rust."}],"max_tokens":64,"stream":true}'

The model guides document supported sampling fields and model-specific limits. Documentation covers the serving interface; metrics and dashboards cover observability.

Supported Models

Only qwen3 is enabled by default, including in the prebuilt binary. Build other lines with --features <feature>. At launch, --model-path selects a checkpoint and its config.json identifies the model family.

Model lineAttention / expertsCargo featureServing scope and guide
**Qwen3 · dense 0.6B to 32B**Full attention, GQAqwen3 · defaultGreedy + sampling, tensor parallel, prefix cache, KV offload; DFlash / DSpark on 4B. [Model page](https://pegainfer.org/models/qwen3-4b/)
**Qwen3.5 · dense 0.8B to 27B**Gated DeltaNet + full attentionqwen35Text-only BF16; build-time Triton. [Model page](https://pegainfer.org/models/qwen35/)
**Gemma 4 · 12B and 26B-A4B**Sliding-window + global attention; NVFP4 routed experts on 26Bgemma4Text-only, single GPU, batched decode and optional chunked prefill. [Model page](https://pegainfer.org/models/gemma4/)
**DeepSeek-V2-Lite**MLA + MoEdeepseek-v2-lite2-GPU EP2 correctness path. [Status and limits](docs/models/deepseek-v2-lite/status.md)
**Kimi-K2 / K2.5**MLA + MoE, Marlin INT4kimi-k28-GPU expert parallelism. [Model roadmap](docs/models/kimi-k2/roadmap.md)
**GLM-5.2**Sparse MLA + MoE, FP8glm52Blackwell; EP decode, TP4 prefill, native MTP speculative decoding, P/D disaggregation. Bring-up. [Model page](https://pegainfer.org/models/glm52/)
**Kimi-K3**KDA + MLA, latent MoE, MXFP4k3Text-only, Blackwell, EP and DSpark. Bring-up. [Model guide](docs/models/k3/bring-up.md)

Capabilities and maturity differ by model. Quantized formats are model-specific; the Qwen paths listed here use BF16. DeepSeek-V2-Lite's retained correctness and benchmark gates are documented separately from production readiness.

🇨🇳 中文文档镜像 AI 翻译 2026-07-05
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

openinfer 是一个基于纯 Rust 和 CUDA 开发的高性能 LLM 推理引擎。与传统的推理框架不同,它不依赖 PyTorch 或其他大型模型框架运行时,旨在通过极致的底层优化提供更轻量、更快速的推理体验,非常适合对性能和资源占用有严苛要求的生产环境。

⚡ 功能介绍

目前 openinfer 支持 Qwen3 系列模型的推理。需要注意的是,针对 Qwen3.5 的 AOT 特性支持需要通过 feature-gated 方���启用 Triton。目前项目正处于快速迭代中,部分量化功能(如 Qwen 系列的 INT4/FP8/FP4)目前针对特定模型(如 Kimi-K2 Marlin 或 DeepSeek-V4)进行了优化,通用量化功能正在持续完善中。

📋 环境依赖

运行 openinfer 需要 Rust (2024 edition) 开发环境以及 CUDA Toolkit (包含 nvcc 和 cuBLAS)。硬件方面必须配备支持 CUDA 的 NVIDIA GPU,且驱动版本需为 R535 (CUDA 12.2) 或更高。对于需要 Triton 支持的特定模型(如 Qwen3.5),开发者需配置相应的 Python 环境以运行 Triton AOT kernels。

🛠 安装步骤(Docker/pip/源码)

项目通过 Cargo 进行构建。对于默认的 Qwen3 构建,无需 Python 环境即可直接运行。若需运行 Qwen3.5,建议使用 `uv` 创建虚拟环境并安装 `triton`,同时通过设置 `OPENINFER_TRITON_PYTHON` 环境变量来指定 Python 解释器。在工作区根目录下使用 `cargo run --release` 即可启动服务,或通过 `-p openinfer-server` 指定包名进行部署。

🚀 使用教程

用户可以通过命令行启动推理服务器。启动时需指定模型路径参数 `--model-path`。请注意,模型逻辑(如 `openinfer-qwen3`)与服务器入口(`openinfer-server`)是分离的,建议从工作区根目录统一调用。对于开发者,可以通过设置 `OPENINFER_TEST_MODEL_PATH` 环境变量来运行精度与集成测试,确保模型输出符合预期。

🔌 API 说明

openinfer 提供与 OpenAI 兼容的 `/v1/completions` API 接口,方便开发者无缝迁移现有应用。接口支持标准的 `prompt` 输入,并允许通过 `max_tokens` 控制生成长度,通过 `temperature` 参数调节采样随机性(设置为 0 即为 Greedy Search 贪婪搜索模式)。

🔄 工作流/模块

openinfer 采用模块化设计,核心逻辑分布在不同的 crate 中。`openinfer-server` 作为服务端入口,而 `openinfer-qwen3`、`openinfer-qwen35-4b` 及 `openinfer-deepseek-v4` 等模型 crate 则负责具体的模型逻辑实现与诊断功能,确保了架构的清晰与可扩展性。

🎯 aiskill88 AI 点评 A 级 2026-07-05

高性能LLM推理引擎,兼容OpenAI

📚 实用指南(长尾问题)
适合谁
  • 构建多智能体协作系统的 Agent 开发者
最佳实践
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
部署方案
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
openinfer 中文教程openinfer 安装报错怎么办openinfer Agent 工作流openinfer 与同类工具对比openinfer 最佳实践openinfer 适合谁用

⚡ 核心功能

👥 适合谁
  • 构建多智能体协作系统的 Agent 开发者
⭐ 最佳实践
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • 安装和初始配置可能需要一定技术基础
  • 功能完整性通常不如成熟商业产品
  • 技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

openinfer 是一款Rust开发的AI辅助工具。开源AI工具:Pure Rust + CUDA LLM inference engine — no PyTorch, OpenAI-compatible, serves Qw。⭐511 · Rust 主要应用场景包括:高性能AI模型推理。
💡 AI Skill Hub 点评

经综合评估,开源推理引擎 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

📚 深入学习 开源推理引擎
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 openinfer
原始描述 开源AI工具:Pure Rust + CUDA LLM inference engine — no PyTorch, OpenAI-compatible, serves Qw。⭐511 · Rust
Topics cudagpuinferencerust
GitHub https://github.com/openinfer-project/openinfer
License Apache-2.0
语言 Rust
🔗 原始来源
🐙 GitHub 仓库  https://github.com/openinfer-project/openinfer 🌐 官方网站  https://open-infer.org/

收录时间:2026-07-05 · 更新时间:2026-07-11 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →