mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
338 lines
24 KiB
HTML
338 lines
24 KiB
HTML
<!DOCTYPE html>
|
||
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="utf-8"/>
|
||
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||
<title>运行时与部署矩阵 - FunASR</title>
|
||
<meta content="运行时与部署矩阵" name="description"/>
|
||
<meta content="#ffffff" name="theme-color"/>
|
||
<link href="https://www.funasr.com/docs/deployment-matrix.html" rel="canonical"/>
|
||
<link href="https://www.funasr.com/en/docs/deployment-matrix.html" hreflang="en" rel="alternate"/>
|
||
<link href="https://www.funasr.com/docs/deployment-matrix.html" hreflang="zh-CN" rel="alternate"/>
|
||
<meta content="website" property="og:type"/>
|
||
<meta content="运行时与部署矩阵 - FunASR" property="og:title"/>
|
||
<meta content="运行时与部署矩阵" property="og:description"/>
|
||
<meta content="https://www.funasr.com/docs/deployment-matrix.html" property="og:url"/>
|
||
<link href="../assets/css/site.7be954c8e106.css" rel="stylesheet"/>
|
||
<link href="../assets/css/experience.34d6e632686e.css" rel="stylesheet"/>
|
||
<script type="application/ld+json">{"@context": "https://schema.org", "@type": "SoftwareApplication", "applicationCategory": "DeveloperApplication", "codeRepository": "https://github.com/modelscope/FunASR", "dateModified": "2026-09-01", "license": "https://github.com/modelscope/FunASR/blob/main/LICENSE", "name": "FunASR", "operatingSystem": "Linux, macOS, Windows", "url": "https://www.funasr.com/docs/deployment-matrix.html"}</script></head>
|
||
<body data-copy-icon="../assets/lucide/copy.ea80e566c7a1.svg" data-language="zh" data-route="/docs/deployment-matrix.html">
|
||
<a class="skip-link" href="#main">跳到主要内容</a>
|
||
<header class="site-header">
|
||
<a aria-label="FunASR 首页" class="brand" href="https://www.funasr.com/">
|
||
<span aria-hidden="true" class="brand-mark">F</span>
|
||
<span>FunASR</span>
|
||
</a>
|
||
<button aria-controls="primary-navigation" aria-expanded="false" class="icon-button menu-button" data-menu-toggle="" title="打开目录" type="button">
|
||
<img alt="" src="../assets/lucide/menu.90a31b3ab1cf.svg"/>
|
||
</button>
|
||
<nav aria-label="主目录" class="primary-navigation" data-primary-nav="" id="primary-navigation">
|
||
<a href="https://www.funasr.com/">产品</a>
|
||
<a href="https://www.funasr.com/deploy/">部署</a>
|
||
<a href="https://www.funasr.com/models.html">模型</a>
|
||
<a href="https://www.funasr.com/benchmarks.html">性能</a>
|
||
<a href="https://www.funasr.com/ecosystem.html">生态</a>
|
||
<a href="https://www.funasr.com/blog/">博客</a>
|
||
<a href="https://www.funasr.com/docs/">文档</a>
|
||
<a href="https://www.funasr.com/donors.html">功德榜</a>
|
||
</nav>
|
||
<div class="header-actions">
|
||
<a class="icon-link" href="https://www.funasr.com/en/docs/deployment-matrix.html" title="English">
|
||
<img alt="" src="../assets/lucide/languages.ae9048feb2c7.svg"/>
|
||
<span>EN</span>
|
||
</a>
|
||
<a aria-label="GitHub" class="icon-button" href="https://www.funasr.com/go/github" title="GitHub">
|
||
<img alt="" src="../assets/lucide/github.793554449a30.svg"/>
|
||
</a>
|
||
</div>
|
||
</header>
|
||
<main id="main">
|
||
<div class="docs-layout">
|
||
<aside class="docs-sidebar">
|
||
<a class="docs-home" href="https://www.funasr.com/docs/">文档中心</a>
|
||
<details class="docs-navigation" open="">
|
||
<summary class="docs-navigation-toggle">浏览目录</summary>
|
||
<details open="">
|
||
<summary>开始使用</summary>
|
||
<nav aria-label="开始使用">
|
||
<a href="https://www.funasr.com/docs/native-transformers.html">Transformers 快速开始</a>
|
||
<a href="https://www.funasr.com/docs/installation.html">安装与环境验证</a>
|
||
<a href="https://www.funasr.com/docs/quickstart.html">第一次转写</a>
|
||
<a href="https://www.funasr.com/docs/python-api.html">Python SDK: AutoModel</a>
|
||
<a href="https://www.funasr.com/docs/model-selection.html">选择第一个模型</a>
|
||
<a href="https://www.funasr.com/docs/command-line.html">命令行转写</a>
|
||
<a href="https://www.funasr.com/docs/migration.html">从 Whisper 与云 API 迁移</a>
|
||
</nav>
|
||
</details>
|
||
<details open="">
|
||
<summary>模型与能力</summary>
|
||
<nav aria-label="模型与能力">
|
||
<a href="https://www.funasr.com/docs/moss-transcribe-diarize.html">MOSS 转写与说话人分离</a>
|
||
<a href="https://www.funasr.com/docs/model-zoo.html">Model Zoo</a>
|
||
<a href="https://www.funasr.com/docs/streaming-vad.html">流式语音活动检测</a>
|
||
<a href="https://www.funasr.com/docs/keyword-spotting.html">关键词检测</a>
|
||
<a href="https://www.funasr.com/docs/speaker-emotion.html">说话人与情感标签</a>
|
||
</nav>
|
||
</details>
|
||
<details open="">
|
||
<summary>训练与扩展</summary>
|
||
<nav aria-label="训练与扩展">
|
||
<a href="https://www.funasr.com/docs/training.html">微调与评测</a>
|
||
<a href="https://www.funasr.com/docs/model-registration.html">自定义模型注册</a>
|
||
</nav>
|
||
</details>
|
||
<details open="">
|
||
<summary>部署与接口</summary>
|
||
<nav aria-label="部署与接口">
|
||
<a href="https://www.funasr.com/docs/docker.html">容器环境与镜像选择</a>
|
||
<a href="https://www.funasr.com/docs/runtime-guide.html">服务部署入口</a>
|
||
<a href="https://www.funasr.com/docs/http-server.html">Python HTTP 服务</a>
|
||
<a href="https://www.funasr.com/docs/kubernetes.html">Kubernetes 部署</a>
|
||
<a aria-current="page" href="https://www.funasr.com/docs/deployment-matrix.html">运行时与部署矩阵</a>
|
||
<a href="https://www.funasr.com/docs/vllm.html">vLLM split-engine 推理</a>
|
||
<a href="https://www.funasr.com/docs/official-native-vllm.html">官方原生 vLLM 功能验证(2026-09-07)</a>
|
||
<a href="https://www.funasr.com/docs/native-vllm.html">社区原生 vLLM 历史记录(2026-08-13)</a>
|
||
</nav>
|
||
</details>
|
||
<details open="">
|
||
<summary>评测与运维</summary>
|
||
<nav aria-label="评测与运维">
|
||
<a href="https://www.funasr.com/docs/troubleshooting.html">安装与推理故障排查</a>
|
||
<a href="https://www.funasr.com/docs/security.html">服务安全边界</a>
|
||
<a href="https://www.funasr.com/docs/benchmark-method.html">可复现性能评测</a>
|
||
<a href="https://www.funasr.com/docs/historical-asr-benchmark.html">历史 ASR 评测</a>
|
||
<a href="https://www.funasr.com/docs/realtime-benchmark.html">实时 WebSocket 压测</a>
|
||
</nav>
|
||
</details>
|
||
<details open="">
|
||
<summary>应用与生态</summary>
|
||
<nav aria-label="应用与生态">
|
||
<a href="https://www.funasr.com/docs/agent-integration.html">Agent 集成</a>
|
||
<a href="https://www.funasr.com/docs/use-cases.html">应用场景与示例</a>
|
||
<a href="https://www.funasr.com/docs/community.html">社区集成</a>
|
||
<a href="https://www.funasr.com/docs/repositories.html">四仓职责与贡献入口</a>
|
||
<a href="https://www.funasr.com/docs/javascript.html">JavaScript 客户端</a>
|
||
<a href="https://www.funasr.com/docs/gradio.html">Gradio 浏览器客户端</a>
|
||
<a href="https://www.funasr.com/docs/workflows.html">工作流集成</a>
|
||
</nav>
|
||
</details>
|
||
<details open="">
|
||
<summary>协议与参考</summary>
|
||
<nav aria-label="协议与参考">
|
||
<a href="https://www.funasr.com/docs/service-api.html">HTTP API 契约</a>
|
||
<a href="https://www.funasr.com/docs/websocket-protocol.html">C++ WebSocket 协议</a>
|
||
<a href="https://www.funasr.com/docs/onnx-output.html">ONNX 二进制输出契约</a>
|
||
</nav>
|
||
</details>
|
||
<a href="https://www.funasr.com/deploy/">部署手册 →</a>
|
||
</details>
|
||
</aside>
|
||
<div class="docs-body">
|
||
<nav aria-label="面包屑" class="breadcrumbs"><a href="https://www.funasr.com/">FunASR</a><span>/</span><a href="https://www.funasr.com/docs/">文档</a><span>/</span><span>运行时与部署矩阵</span></nav>
|
||
<header class="docs-title"><h1>运行时与部署矩阵</h1><a class="source-link" data-source-link="" href="https://github.com/modelscope/FunASR/blob/main/docs/deployment_matrix_zh.md">查看 / 编辑源文档 ↗</a></header>
|
||
<article class="docs-article"><div class="source-title-anchor" id="funasr-部署选型表"></div>
|
||
<p>这个页面帮助你为产品、demo、benchmark 或内部工作流选择最短部署路径。先选择能满足目标的最小方案,只有在吞吐、延迟或集成方式有明确要求时,再切换到更重的运行时。</p>
|
||
<span data-legacy-doc-anchor="快速决策表" id="matrix"></span><h2 id="快速决策表">快速决策表</h2>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>路径</th>
|
||
<th>适合场景</th>
|
||
<th>从这里开始</th>
|
||
<th>运维提示</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>原生 Transformers</td>
|
||
<td>Nano 首次转写、Notebook 与 Hugging Face Python 应用</td>
|
||
<td><a href="https://www.funasr.com/docs/native-transformers.html">原生 Fun-ASR-Nano 指南</a></td>
|
||
<td>正式版 <strong>5.17.0</strong>,官方 <code>-hf</code> checkpoint,CPU 与批处理示例。是 Python 推理入口,不是 HTTP 或实时服务器。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Colab Notebook</td>
|
||
<td>浏览器 smoke test、首次评估、可分享 demo</td>
|
||
<td><a href="https://github.com/modelscope/FunASR/blob/main/examples/colab/README_zh.md">Colab 快速体验</a></td>
|
||
<td>不需要本地环境;首次运行会下载模型,GPU runtime 更快。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Python API</td>
|
||
<td>Notebook、离线任务、首次模型评测</td>
|
||
<td><a href="https://github.com/modelscope/FunASR/blob/main/README_zh.md#快速开始">README 快速开始</a></td>
|
||
<td>最简单;调用方自己负责批处理、重试和文件管理。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>OpenAI 兼容 API</td>
|
||
<td>私有语音 API、Agent、Dify/LangChain/AutoGen 风格客户端</td>
|
||
<td><a href="https://www.funasr.com/docs/http-server.html">OpenAI API 示例</a></td>
|
||
<td>已支持 OpenAI audio API 的应用最容易接入。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Xinference</td>
|
||
<td>已经使用 Xinference 统一管理模型服务的团队</td>
|
||
<td><a href="https://github.com/xorbitsai/inference">Xinference 仓库</a></td>
|
||
<td>使用包含 <a href="https://github.com/xorbitsai/inference/pull/5140">xorbitsai/inference#5140</a> 的版本或 commit,确保 Fun-ASR-Nano 使用打包发布的 <code>funasr~=1.3.0</code>,而不是旧的 git commit pin。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Docker Compose API</td>
|
||
<td>本地 smoke test 或小型内部服务</td>
|
||
<td><a href="https://www.funasr.com/docs/http-server.html">OpenAI API Docker 文档</a></td>
|
||
<td>默认 CPU;容器里使用 CUDA 前需要先适配 CUDA-capable 镜像。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Kubernetes API</td>
|
||
<td>集群内私有语音 API</td>
|
||
<td><a href="https://www.funasr.com/docs/kubernetes.html">Kubernetes 模板</a></td>
|
||
<td>默认私有 <code>ClusterIP</code>;对外开放前补齐鉴权、TLS、网络策略和 GPU 调度。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Runtime WebSocket 服务</td>
|
||
<td>实时字幕、会议、客服流式音频</td>
|
||
<td><a href="https://www.funasr.com/docs/runtime-guide.html">Runtime 服务文档</a></td>
|
||
<td>需要中间结果、断句或长连接音频流时选择。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ONNX/C++ Runtime</td>
|
||
<td>高并发 CPU 服务或嵌入式实时 ASR</td>
|
||
<td><a href="https://github.com/modelscope/FunASR/blob/main/runtime/onnxruntime/readme.md">ONNX Runtime 文档</a></td>
|
||
<td>如果延迟和并发已经验证,不要轻易替换;固定业务词优先做文本后处理。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>vLLM 加速</td>
|
||
<td>Fun-ASR-Nano 原生文件转写或 split-engine LLM 解码</td>
|
||
<td><a href="https://www.funasr.com/docs/official-native-vllm.html">官方原生验证</a>;<a href="https://www.funasr.com/docs/vllm.html">split-engine 指南</a></td>
|
||
<td>原生路径固定官方 a4362c94 本地快照、vLLM 0.27.1,仅为既有环境功能验证,不是全新安装或容量验证;不适用于非自回归 Paraformer。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>MOSS-Transcribe-Diarize</td>
|
||
<td>长音频多人转写、时间戳和说话人标签</td>
|
||
<td><a href="https://www.funasr.com/en/docs/moss-transcribe-diarize.html">第三方 MOSS 部署指南</a></td>
|
||
<td>OpenMOSS Apache-2.0 模型,已接入 FunASR <code>AutoModel</code>;可选本地 HF(<code>backend="hf"</code>)、vLLM(<code>backend="vllm"</code>)或 SGLang Omni(<code>backend="sglang"</code>)。模型仍由 OpenMOSS 发布和维护。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>MCP 服务</td>
|
||
<td>Claude/Cursor/桌面 Agent 语音工具</td>
|
||
<td><a href="https://github.com/modelscope/FunASR/blob/main/examples/mcp_server">MCP 示例</a></td>
|
||
<td>适合把 ASR 结果暴露成一个本地工具。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>字幕生成</td>
|
||
<td>从长音频或视频生成 SRT/VTT</td>
|
||
<td><a href="https://github.com/modelscope/FunASR/blob/main/examples/subtitle">字幕示例</a></td>
|
||
<td>需要可读性时使用 verbose segments 和说话人标签。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>批处理脚本</td>
|
||
<td>录音归档、会议纪要、数据集处理</td>
|
||
<td><a href="https://github.com/modelscope/FunASR/blob/main/examples/batch_asr_improved.py">批处理示例</a></td>
|
||
<td>生产使用时建议增加队列、manifest 和重试日志。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Triton Runtime</td>
|
||
<td>专门的高性能推理服务</td>
|
||
<td><a href="https://github.com/modelscope/FunASR/blob/main/runtime/triton_gpu/README.md">Triton 文档</a></td>
|
||
<td>配置更重;适合已经在运维 Triton/GPU serving 的团队。</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<span data-legacy-doc-anchor="常见选择" id="choices"></span><h2 id="常见选择">常见选择</h2>
|
||
<h3 id="我想五分钟内试跑-funasr">我想五分钟内试跑 FunASR</h3>
|
||
<p>如果只想在浏览器里 smoke test,可以先用 <a href="https://github.com/modelscope/FunASR/blob/main/examples/colab/README_zh.md">Colab 快速体验</a>;本地工作再使用 README 里的 Python API。它是验证安装、模型下载、设备选择和基础输出格式的最短路径。如果还不确定先用哪个模型,请看 <a href="https://www.funasr.com/docs/model-selection.html">模型选择指南</a>。</p>
|
||
<h3 id="我想替代云端转写服务">我想替代云端转写服务</h3>
|
||
<p>使用 OpenAI 兼容 API。它提供 <code>/v1/audio/transcriptions</code>、<code>/v1/models</code>、<code>/health</code> 和 Swagger docs。先用 <code>sensevoice</code> 跑通 <code>examples/openai_api/smoke_test.sh</code> 或 <code>examples/openai_api/smoke_test.py</code>,再根据 <a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/CLIENTS.md">客户端配方</a> 和 <a href="https://www.funasr.com/docs/javascript.html">JavaScript/TypeScript 配方</a> 接入 SDK 或 HTTP 客户端。浏览器上传或麦克风 demo 可使用 <a href="https://www.funasr.com/docs/gradio.html">Gradio 浏览器 Demo</a>。Dify、n8n、HTTP 节点或 webhook worker 可参考 <a href="https://www.funasr.com/docs/workflows.html">工作流配方</a>。API 网关、开发者门户或按 schema 导入时可使用 <a href="https://www.funasr.com/docs/service-api.html">OpenAPI 规范</a>。跨团队共享服务前,请先阅读 <a href="https://www.funasr.com/docs/security.html">安全与网关指南</a>。</p>
|
||
<h3 id="我已经在使用-xinference">我已经在使用 Xinference</h3>
|
||
<p>如果你的系统已经用 Xinference 管理模型注册、virtualenv 隔离和服务生命周期,可以选择 Xinference 路径。请确认使用的 Xinference 版本或 commit 包含 <a href="https://github.com/xorbitsai/inference/pull/5140">xorbitsai/inference#5140</a>;该更新把 Fun-ASR-Nano model spec 从旧的 FunASR git SHA 改为打包发布的 <code>funasr~=1.3.0</code> 依赖。首次评估 FunASR,或需要面向 Agent 的 OpenAI 兼容转写接口时,仍建议先从上面的 FunASR 原生 OpenAI API 示例开始。</p>
|
||
<h3 id="我想要可复现的容器-demo">我想要可复现的容器 demo</h3>
|
||
<p>在 <strong>FunASR 仓库根目录</strong>,准备好 Docker Engine 和 Docker Compose 插件后,启动本地 SenseVoice CPU 服务。这条命令不会覆盖已有 <code>.env</code>,显式设置会在本次启动中覆盖环境里遗留的端口、设备和模型值。主机端口仅绑定 loopback,不是鉴权网关;共享前先阅读<a href="https://www.funasr.com/docs/security.html">安全与网关指南</a>。</p>
|
||
<pre id="code-0"><code class="language-bash">FUNASR_HOST_PORT=127.0.0.1:8000 FUNASR_DEVICE=cpu FUNASR_MODEL=sensevoice \
|
||
docker compose -f examples/openai_api/docker-compose.yml up --build
|
||
</code></pre>
|
||
<p>保持该终端中的 Compose 运行。打开<strong>第二个终端,仍位于同一仓库根目录</strong>,使用 Python 3.10 或更高版本运行;smoke 客户端仅依赖标准库,不需要在主机安装 FunASR:</p>
|
||
<pre id="code-1"><code class="language-bash">python3 examples/openai_api/smoke_test.py --base-url http://127.0.0.1:8000 --model sensevoice --response-format verbose_json
|
||
</code></pre>
|
||
<p>客户端仅在当前目录不存在 <code>sample.wav</code> 时下载公开中文样本,已有文件会被复用。它打印 health、模型 metadata 和转写 JSON;请自行检查文本,退出码成功不代表识别质量或并发验收。客户端不发送 Authorization,安全指南的仅转写网关会拒绝该 smoke 使用的 metadata 路由。请通过本地端点运行,避免保留敏感音频和未脱敏输出。</p>
|
||
<p>CPU 镜像复制 example 服务,但从 PyPI 安装 FunASR,依赖环境未锁定。声称可复现前,请记录实际包版本和镜像 digest。单独修改 <code>FUNASR_DEVICE</code> 不会增加 CUDA 依赖或容器 GPU 访问能力;GPU 镜像与调度需要另外准备和验证,参见<a href="https://www.funasr.com/docs/http-server.html#docker-部署">完整 HTTP 部署指南</a>及所选模型的服务要求。</p>
|
||
<h3 id="我想部署集群内服务">我想部署集群内服务</h3>
|
||
<p>使用 <a href="https://www.funasr.com/docs/kubernetes.html">Kubernetes 模板</a> 部署私有 <code>ClusterIP</code> OpenAI 兼容 API,包含持久化模型缓存、<code>/health</code> probes 和 port-forward smoke test 路径。在没有 CUDA-capable 镜像和集群 GPU 调度前,请保持默认 CPU 模式。</p>
|
||
<h3 id="我需要流式识别或实时字幕">我需要流式识别或实时字幕</h3>
|
||
<p>使用 Runtime WebSocket 服务。上线前请用真实音频验证 chunk size、VAD、断句、标点、说话人分离、重连行为和客户端背压。</p>
|
||
<h3 id="我已有高并发-onnx但需要热词">我已有高并发 ONNX,但需要热词</h3>
|
||
<p>不要只因为当前 CPU ONNX/C++ 实时链路缺少热词,就把整条已经跑稳的链路迁到 GPU 大模型。先确认产品里的“热词”到底是哪一种:</p>
|
||
<ul>
|
||
<li>如果是公司名、产品名、专有名词或固定误识别纠错,优先保留 ONNX 链路,在最终文本上做确定性后处理。这样能保留已经验证过的 CPU 并发能力,也更容易审计。</li>
|
||
<li>如果必须在解码阶段影响识别,或者确实存在多语言/语义理解上的质量缺口,再测试 Fun-ASR-Nano、Qwen3-ASR 等 GPU 路径;但要按首包延迟、尾包延迟、音频切片长度、VAD 策略和同时说话路数重新压测。</li>
|
||
<li>如果两类需求都有,只在 GPU 模型质量或语言覆盖明显更好的流量上使用 GPU,其他高吞吐稳定流量继续走 ONNX。</li>
|
||
</ul>
|
||
<p>开部署 issue 时,请附上当前 ONNX 并发、CPU 核数、目标热词、可接受端到端延迟、GPU 型号、模型启动命令,以及热词是“识别后纠错”还是“解码阶段偏置”。</p>
|
||
<h3 id="我需要更高的-llm-based-asr-吞吐">我需要更高的 LLM-based ASR 吞吐</h3>
|
||
<p>Fun-ASR-Nano 走 vLLM 路径。请用自己的音频分布做 benchmark,并关注 GPU 显存、tensor parallel size、首 token 延迟和 warmup 时间。</p>
|
||
<h3 id="我想在昇腾-npu-上跑-fun-asr-nano">我想在昇腾 NPU 上跑 Fun-ASR-Nano</h3>
|
||
<p>Fun-ASR-Nano 的 LLM-based 路径目前主要按 CUDA/vLLM、标准 PyTorch CPU/GPU,以及 CPU/边缘 GGUF runtime 记录和验证;Ascend NPU(<code>torch_npu</code>)仍不是这个模型的官方生产运行时。不要因为 SenseVoice 或 Paraformer 能在 NPU 上跑,就默认 Fun-ASR-Nano 也能直接跑通,因为 Nano 还会经过 Qwen 解码器、<code>inputs_embeds</code>,以及后端相关的 autocast / 算子路径。</p>
|
||
<p><a href="https://github.com/modelscope/FunASR/issues/3034">#3034</a> 里的社区复测表明:修复 autocast device 之后,PyTorch <code>AutoModel(..., device="npu:*")</code> 路径已经能进入 NPU 后端,并在 310P3、<code>torch_npu 2.5.1</code>、CANN 8.5.1 环境里产出正确文本。但该 smoke run 明显慢于 CPU(NPU <code>rtf_avg</code> 约 124,CPU 约 1.9),所以这只能作为兼容性证据,不是性能推荐。同一报告里,<code>AutoModelVLLM</code> + <code>vllm_ascend 0.9.2rc1</code> 仍在 Qwen3 rotary embedding / <code>TransData</code> 算子支持处失败;这条路径应按 vLLM-Ascend runtime / 算子兼容问题继续排查,并建议带 <code>ASCEND_LAUNCH_BLOCKING=1</code> 复现日志。</p>
|
||
<p>如果你正在适配这个后端,请保持第一版范围很小:先从 <code>torch.bfloat16</code> 开始,记录 <code>torch</code> / <code>torch_npu</code> / CANN / 驱动 / NPU 型号,把 PyTorch <code>AutoModel</code> 和 <code>AutoModelVLLM</code> 分开验证,并在 PR 或 deployment issue 里附上最小命令和完整 stack trace。</p>
|
||
<span data-legacy-doc-anchor="上线检查清单" id="runtime-diagnostics"></span><span data-legacy-doc-anchor="上线检查清单" id="checklist"></span><h2 id="上线检查清单">上线检查清单</h2>
|
||
<ul>
|
||
<li>选择模型 alias,并写入部署说明。</li>
|
||
<li>记录 FunASR 版本、模型版本、设备、CUDA/PyTorch 版本、Docker 镜像 tag 和启动命令。</li>
|
||
<li>跑一个公开短音频 smoke sample,再跑至少一个真实私有样本。</li>
|
||
<li>每次请求记录音频时长、模型、设备、延迟、响应格式和错误类型。</li>
|
||
<li>API 暴露到可信网络外之前,增加上传大小限制、鉴权、TLS 和限流;可用 <a href="https://www.funasr.com/docs/security.html">安全与网关指南</a> 规划边界。</li>
|
||
<li>热词或纠错需求要先记录它是确定性后处理,还是解码阶段偏置;替换已有 runtime 前同时 benchmark 质量和延迟。</li>
|
||
<li>流式场景需要测试静音、噪声、多人重叠、长连接、重连和慢客户端。</li>
|
||
<li>发布 benchmark 结论时,说明输入时长、硬件、batch size、模型、运行路径,以及是否排除模型下载和 warmup 时间。</li>
|
||
</ul>
|
||
<span data-legacy-doc-anchor="什么时候开-issue" id="help"></span><h2 id="什么时候开-issue">什么时候开 issue</h2>
|
||
<p>Runtime、Docker、vLLM、Triton、Android、浏览器或 Agent 集成问题,请使用 <a href="https://github.com/modelscope/FunASR/issues/new?template=deployment_help.md">Deployment Help</a>。请附上部署路径、完整命令/config、日志、模型、设备和音频特征。</p></article>
|
||
<nav aria-label="相邻文档" class="docs-next">
|
||
<a href="https://www.funasr.com/docs/kubernetes.html">← Kubernetes 部署</a><a href="https://www.funasr.com/docs/vllm.html">vLLM split-engine 推理 →</a> </nav>
|
||
</div>
|
||
<aside class="docs-toc"><strong>本页目录</strong><div class="toc">
|
||
<ul>
|
||
<li><a href="#funasr-部署选型表">FunASR 部署选型表</a><ul>
|
||
<li><a href="#快速决策表">快速决策表</a></li>
|
||
<li><a href="#常见选择">常见选择</a><ul>
|
||
<li><a href="#我想五分钟内试跑-funasr">我想五分钟内试跑 FunASR</a></li>
|
||
<li><a href="#我想替代云端转写服务">我想替代云端转写服务</a></li>
|
||
<li><a href="#我已经在使用-xinference">我已经在使用 Xinference</a></li>
|
||
<li><a href="#我想要可复现的容器-demo">我想要可复现的容器 demo</a></li>
|
||
<li><a href="#我想部署集群内服务">我想部署集群内服务</a></li>
|
||
<li><a href="#我需要流式识别或实时字幕">我需要流式识别或实时字幕</a></li>
|
||
<li><a href="#我已有高并发-onnx但需要热词">我已有高并发 ONNX,但需要热词</a></li>
|
||
<li><a href="#我需要更高的-llm-based-asr-吞吐">我需要更高的 LLM-based ASR 吞吐</a></li>
|
||
<li><a href="#我想在昇腾-npu-上跑-fun-asr-nano">我想在昇腾 NPU 上跑 Fun-ASR-Nano</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="#上线检查清单">上线检查清单</a></li>
|
||
<li><a href="#什么时候开-issue">什么时候开 issue</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</aside></div>
|
||
</main>
|
||
<footer class="site-footer">
|
||
<div>
|
||
<strong>FunASR</strong>
|
||
<p>面向生产部署的开源语音基础设施。</p>
|
||
</div>
|
||
<nav aria-label="官方仓库" class="footer-repositories" data-footer-repositories="">
|
||
<strong>官方仓库</strong>
|
||
<div class="footer-links">
|
||
<a href="https://www.funasr.com/go/fun-asr">Fun-ASR</a>
|
||
<a href="https://www.funasr.com/go/sensevoice">SenseVoice</a>
|
||
<a href="https://www.funasr.com/go/funclip">FunClip</a>
|
||
</div>
|
||
</nav>
|
||
<div class="footer-links">
|
||
<a href="https://www.funasr.com/deploy/">部署</a>
|
||
<a href="https://www.funasr.com/docs/">文档</a>
|
||
<a href="https://www.funasr.com/go/releases">发布</a>
|
||
<a href="https://www.funasr.com/donors.html">功德榜</a>
|
||
</div>
|
||
</footer>
|
||
<script defer="" src="../assets/js/site.d446f5fbcfe2.js"></script>
|
||
<script defer="" src="../assets/js/experience.3f688a12942a.js"></script>
|
||
</body>
|
||
</html>
|