较大的 MoE 模型可能在目标任务上取得更好的效果,同时无需为每个 token 激活全部参数。
MoE(混合专家)模型会用各领域专家组成的网络,替代稠密模型中的部分层。在稠密模型中,一层中的每个参数都会参与每个 token 的计算。而在 MoE 模型中,路由器会根据当前 token 的内容判断,只选择少量相关专家,通常称为 Top-K 专家(得分最高的 K 个专家)。只有这些被选中的专家会参与该 token 的计算。因此,MoE 模型可以拥有远超其任一时刻实际激活规模的总参数量。根据模型和工作负载的不同,这种方式可能提升编程、推理、工具使用、多语言处理和特定领域任务的表现,同时无需承担同等规模稠密模型所需的实际计算量。
将完整模型保留在 aiDAPTIV™ Cache Memory 中,并仅将每个 token 所需的专家换入统一内存。
Without aiDAPTIV, the whole AI model must load
into unified memory.
aiDAPTIV offloads the full MoE model to cache and swaps only the needed experts into memory.
Run the same MoE model in roughly half the unified memory – larger models become practical on AI PCs.
一个总参数量达到数千亿的模型,每个 token 可能只激活其中很小一部分参数,故它的实际计算需求仍在可承受范围内,但完整参数所需的存储空间可能超过可用的 GPU 内存或统一内存。
A model with hundreds of billions of total parameters may activate only a small fraction per token.
Its active compute requirement can be manageable. Its full parameter footprint may still exceed available GPU or unified memory.
这就是 MoE 的内存问题。
在兼容的集成环境中,Pascari aiDAPTIV™ 会让当前参与计算的专家靠近计算资源,同时将可用专家池扩展至 GPU 内存、系统内存和缓存内存。
一些客户端系统、工作站、边缘部署环境或服务器,其 GPU 或统一内存无法容纳完整专家池,通过这种方式,它们也可以运行大型稀疏模型。
一些任务会反复使用相似的专家工作集。 在这种情况下,更多当前任务所需的专家可以始终靠近计算资源。
另一些任务则会在不同领域、语言、代码风格、工具或推理模式之间快速切换。这可能导致任务要在较短时间内调用更多不同的专家,从而增加专家在内存系统中的移动。
这就是 MoE 性能优化中的核心矛盾。
交互式 AI 并不会因此自动被排除。是否适用,取决于专家局部性、平台配置,以及应用体验对延迟一致性的要求。
Disclaimer: When the router selects an expert already resident near compute, the model can continue with minimal additional data movement. When it selects an expert that must be brought forward from system memory or cache memory, computation waits for that expert to arrive.
The outcome depends on platform memory bandwidth, cache memory throughput, PCIe or interconnect bandwidth, model architecture, router behavior, expert locality, prompt diversity, and runtime implementation. A larger MoE is worth using only when its added capability matters to the task. aiDAPTIV expands model capacity; it does not guarantee the latency of a fully GPU-resident model.