Qualcomm moves AI image generation to the edge

2023-02-26 15:13:42
关注

Producing pictures of cats in jackets, chip giant Qualcomm has successfully ported and run the Stable Diffusion foundation model on a mobile phone for the first time. The company says this is a major breakthrough in Edge AI that will enable companies to reduce cloud fees and increase security by bringing generative AI to edge computing.

Qualcomm says by running Stable Diffusion on an edge device like a mobile phone companies could save on cloud fees (Photo: Qualcomm)
Qualcomm says by running Stable Diffusion on an edge device such as a mobile phone, companies could save on cloud fees. (Photo: Qualcomm)

The model runs completely on the device which significantly reduces runtime latency and power consumption, according to the Qualcomm AI research team. The neural network was trained on a vast quantity of data at scale, allowing users to generate photorealistic images from a line or word of text – which makes it power-hungry when it is run.

The company had to optimise every layer of the Stable Diffusion model as well as the entire application, the model, the algorithms, software and the hardware to get it working on a Snapdragon 8 Gen 2 mobile platform. They did this through re-training and post-training quantisation that significantly reduced the power, memory and energy requirements.

They used the FP32 version of Stable Diffusion from Hugging Face – that is the 32 single precision floating point model, a format used in scientific calculation that doesn’t require a great emphasis on precision, and is widely used in AI – then converted it to the smaller, more manageable INT8 format which uses 8-bit integers instead of floating points.

They had to run the re-training techniques across every component model used to make Stable Diffusion work, including the text encoder and Unet. It was also in part possible due to optimisations made to the Qualcomm AI Engine and co-design and integration of hardware and software on the HExagon Processor. Snapdragon 8 Gen 2 also comes with micro tile inferencing which enables large models to run efficiently, which suggests we could see more AI models running on edge devices in future.

Reducing latency and cloud fees

“The result of this full-stack optimisation is running Stable Diffusion on a smartphone in under 15 seconds for 20 inference steps to generate a 512×512 pixel image — this is the fastest inference on a smartphone and comparable to cloud latency. User text input is completely unconstrained,” Qualcomm engineers wrote.

This, says Qualcomm, is the start of the “edge AI era” with large AI cloud models gravitating towards edge devices making them faster and more secure. “Although the Stable Diffusion model seems quite large, it encodes a huge amount of knowledge about speech and visuals for generating practically any imaginable picture,” the engineers wrote.

Its potential goes beyond making pretty pictures, as developers could now integrate this technology into image editing, in painting and style transfer applications running completely on the device even without an internet connection.

Content from our partners

The role of modern ERP in transforming the distribution and logistics sector

The role of modern ERP in transforming the distribution and logistics sector

How designers are leveraging tech to apply the brakes to fast fashion

How designers are leveraging tech to apply the brakes to fast fashion

Why the tech sector must embrace faster, smarter talent recruitment

Why the tech sector must embrace faster, smarter talent recruitment

Qualcomm says it will now focus on scaling edge AI including further optimisation of Stable Diffusion to run efficiently on phones and other platforms including laptops, XR headsets and any other device with a Snapdragon processor.

View all newsletters Sign up to our newsletters Data, insights and analysis delivered to you By The Tech Monitor team

This, the company says, will allow end users to reduce cloud computing costs by running processes at the edge and ensure privacy as the input and output never leave the device. “The new AI stack optimisation also means that the time-to-market for the next foundation model that we want to run on the edge will also decrease. This is how we scale across devices and foundation models to make edge AI truly ubiquitous.”

Read more: Nvidia reveals cloud AI tools as it cashes in on ChatGPT success

Topics in this article : AI , Qualcomm

参考译文
高通将人工智能图像生成推向边缘
通过生成穿着夹克的猫咪图像,芯片巨头高通成功地首次将Stable Diffusion基础模型移植并运行在手机上。该公司表示,这是边缘人工智能(Edge AI)的重要突破,能够通过将生成式人工智能部署到边缘计算中,帮助公司减少云费用并提高安全性。高通表示,通过在手机等边缘设备上运行Stable Diffusion,公司可以节省云费用。 (图片:高通) 据高通人工智能研究团队称,该模型完全在设备上运行,大幅降低了运行延迟和耗电量。该神经网络是在大规模数据上训练的,允许用户仅凭一行文字或一个单词就生成逼真的图像——这也意味着在运行时需要大量计算资源。为使Stable Diffusion模型能够在Snapdragon 8 Gen 2移动平台上运行,公司必须对模型的每一层以及整个应用程序、模型、算法、软件和硬件进行优化。他们通过重新训练和训练后量化技术显著降低了模型的功耗、内存和能耗。 他们使用了来自Hugging Face的FP32版本Stable Diffusion模型——即32位单精度浮点模型,这是一种在科学计算中广泛使用的格式,对精度要求不高,也广泛用于人工智能计算中——然后将其转换为体积更小、更便于管理的INT8格式,该格式使用的是8位整数而非浮点数。他们必须在所有用于运行Stable Diffusion的组件模型中应用重新训练技术,包括文本编码器和Unet。 这在一定程度上也得益于对高通AI引擎所做的优化,以及Hexagon处理器上软硬件协同设计与集成的成果。Snapdragon 8 Gen 2还具备微图块推理功能,能够高效运行大型模型,这表明未来我们或将看到更多人工智能模型运行在边缘设备上。 减少延迟和云费用 高通工程师写道:“通过这一全栈优化,Stable Diffusion在手机上以不到15秒的时间完成20次推理步骤,生成512×512像素的图像,这是智能手机上最快的推理速度,与云端延迟相当。用户输入的文本完全不受限制。” 高通表示,这标志着“边缘AI时代”的开始,大型人工智能云模型将逐渐向边缘设备迁移,从而使其运行更快、更安全。工程师们写道:“尽管Stable Diffusion模型看起来体积庞大,但它包含了大量关于语言和图像的知识,能够生成几乎任何可以想象的图片。” 除了生成精美图片,其潜力还远不止于此。开发人员现在可以将这一技术完全集成到图像编辑、绘画和风格转换应用中,即使没有网络连接,也可以在设备上运行。 合作伙伴内容 现代ERP在改造分销和物流行业中的作用 设计师如何利用技术遏制快时尚 科技行业为何必须加快、优化人才招聘 高通表示,接下来将专注于扩展边缘人工智能,包括进一步优化Stable Diffusion,使其能够高效运行在手机及其他平台(包括笔记本电脑、XR头显以及任何搭载骁龙处理器的设备)上。 查看所有通讯 注册我们的通讯 数据、洞察和分析送达您手中 由Tech Monitor团队提供 立即注册 该公司表示,这将使终端用户可以通过边缘计算减少云计算成本,并确保隐私,因为输入和输出数据永远不会离开设备。 高通表示,“新的AI堆栈优化还意味着我们希望在边缘运行的下一个基础模型投入市场所需的时间也将减少。这正是我们如何跨设备和基础模型扩展,使边缘人工智能真正普及的方式。” 阅读更多:英伟达推出云AI工具,借势ChatGPT成功 本文涉及话题:人工智能、高通
您觉得本篇内容如何
评分

评论

您需要登录才可以回复|注册

提交评论

提取码
复制提取码
点击跳转至百度网盘