[论文解读] Generative AI on the Edge: Architecture and Performance Evaluation
该论文在仅有 CPU 的 Raspberry Pi 边缘集群上,使用由 K3s 管理的基于 Docker 的设置,对各种 LLM 进行评估,量化吞吐量、延迟、内存/CPU 使用以及准确性,以评估 GenAI 在边缘的可行性,无需云端依赖。
6G's AI native vision of embedding advance intelligence in the network while bringing it closer to the user requires a systematic evaluation of Generative AI (GenAI) models on edge devices. Rapidly emerging solutions based on Open RAN (ORAN) and Network-in-a-Box strongly advocate the use of low-cost, off-the-shelf components for simpler and efficient deployment, e.g., in provisioning rural connectivity. In this context, conceptual architecture, hardware testbeds and precise performance quantification of Large Language Models (LLMs) on off-the-shelf edge devices remains largely unexplored. This research investigates computationally demanding LLM inference on a single commodity Raspberry Pi serving as an edge testbed for ORAN. We investigate various LLMs, including small, medium and large models, on a Raspberry Pi 5 Cluster using a lightweight Kubernetes distribution (K3s) with modular prompting implementation. We study its feasibility and limitations by analyzing throughput, latency, accuracy and efficiency. Our findings indicate that CPU-only deployment of lightweight models, such as Yi, Phi, and Llama3, can effectively support edge applications, achieving a generation throughput of 5 to 12 tokens per second with less than 50\% CPU and RAM usage. We conclude that GenAI on the edge offers localized inference in remote or bandwidth-constrained environments in 6G networks without reliance on cloud infrastructure.
研究动机与目标
- 在 6G/ORAN 场景中,激发并量化在资源受限的边缘设备上运行 Generative AI 的可行性。
- 评估在边缘硬件上,不同 LLM 尺寸在吞吐量、延迟、内存、CPU 使用和准确性方面的权衡。
- 提供一个可扩展的边缘 AI 测试平台和方法学,供未来在网络边缘进行 GenAI 实验。
- 基于经验结果,为边缘部署中的模型选择和配置提供具体指导。
提出的方法
- 使用 K3s(轻量级 Kubernetes)编排的四个 Raspberry Pi 5 节点构建的边缘测试平台。
- 以模块化 API 为基础架构的 Docker 化 PromptAI 服务,用于模型选择和推理路由。
- 通过基于 Docker 的工作流,从 Hugging Face 部署 4 位量化 GGUF 模型。
- 评估使用 OpenAssistant/oasst1 提示集的子集(50 对话,5 轮以上)来测量内存、CPU、延迟、准确性和吞吐量。
- 性能分析使用 llama.cpp 框架进行确定性推理,且每个提示最多生成 500 个 token。

实验结果
研究问题
- RQ1CPU 仅有的边缘设备(Raspberry Pi 集群)能否有效运行用于对话式 AI 任务的 LLM 推理?
- RQ2模型大小(large、medium、small)和量化(4-bit GGUF)如何影响在边缘硬件上的吞吐量、延迟、内存、CPU 和准确性?
- RQ3在实时对话场景中,边缘部署的 LLM 的稳定性和上下文敏感性特征是什么?
- RQ4哪些部署架构和工具(K3s、Docker、PromptAI)最能支持可扩展的、模块化的边缘 GenAI 实验?
主要发现
- 轻量级模型(Yi, Phi)在 CPU 上实现实用的吞吐量和延迟,生成大约每秒 5–12 个 token,CPU 与 RAM 使用均在 50% 以下。
- 端到端延迟和吞吐量随模型大小而异;如 Yi 等小模型显示最快的端到端总时长(例如 Yi 在每个 token 的总时间方面显著快于 InternLM),而较大模型在延迟代价下提供更高的准确性。
- 内存使用通常随模型大小增加(InternLM、Mistral、Llama2>0.66–3.14 GB),而 CPU 使用在大多数模型上大约维持在 ~50%。
- 在 Winogrande 基准上的准确性因模型而异,InternLM ~0.8,Gemma ~0.7,Llama3 ~0.69,而 Yi 和 Zephyr 分别约为 0.49 和 0.46(非微调变体)。
- 吞吐量 CV 分析显示不同的上下文长度敏感性;某些模型(Mistral、InternLM)在不同提示长度下稳定,而其他模型(Llama3、Phi、Yi)在 Prefill/Decode 阶段波动性更大。
- 系统在部署过程中表现出鲁棒性,没有发生内存不足错误或重启,量化成功降低内存使用,同时接受了部分准确性下降。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。