<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://sufan.maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://sufan.maytide.net/read.php/2168.htm</link>
<title><![CDATA[微软 Foundry Local - 设备 AI 推理解决方案]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[Windows Client]]></category>
<pubDate>Sat, 18 Oct 2025 05:26:12 +0000</pubDate> 
<guid>https://sufan.maytide.net/read.php/2168.htm</guid> 
<description>
<![CDATA[ 
	<p><a href="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/ai-foundry.png"><img width="200" height="200" title="Untitled design - 1" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="Untitled design - 1" src="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/ai-foundry_thumb.png" border="0"></a>&nbsp;</p><p><strong><font color="#fd3f0d" size="4">微软 Foundry Local - 设备 AI 推理解决方案</font></strong></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 微软在其 2025 Build 大会上发布了 Foundry Local，能够在本地设备上执行 AI 推理，意味着可以利用本地的 AI 算力，如：CPU/GPU/NPU；也让用户在隐私方面得到了充足的保障，还能有改善成本效益！Foundry Local 默认除了支持 CLI外，还支持 SDK、REST API 和 Catalog API，用户可以自行基于 Foundry Local 进行开发。在未来 Foundry Local 还将内置对 Agent/MCP 的支持。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foundry Local 还支持跨平台，除了能够运行在Windows 11 上，还能够运行在 macOS。由于需要本地存储和运行模型，请确保有足够的算力和存储，Foundry Local 支持硬件加速：NVIDIA GPU（2000系列或更高版本）、AMD GPU（6000系列或更高）、Intel iGPU、Intel NPU（32GB或更多内存）、高通 Snapdragon X Elite（8GB或更多内存）、高通 NPU，以及 Apple 系列。</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 要在本地以 Foundry Local 运行 AI 模型，首先需要安装 Foundry Local。</p><ul><li>Windows：</li><ul><li><strong>winget install Microsoft.FoundryLocal</strong></li></ul><li>macOS：</li><ul><li><strong>brew tap microsoft/foundrylocal</strong></li><li><strong>brew install foundrylocal</strong></li></ul></ul><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 运行模型只需要执行：</p><p><strong>foundry model run</strong> &lt;model&gt;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在 Foundry Local 上可运行的模型有很多，可使用以下命令查看：</p><p><strong>foundry model list</strong></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 还可以加载 --filter 参数对显示列表进行筛选。</p><p><a href="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/Foundry-model-list.png"><img width="630" height="572" title="Foundry-model-list" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="Foundry-model-list" src="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/Foundry-model-list_thumb.png" border="0"></a></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其他有用的参数还有：</p><p><strong>foundry model info</strong> &lt;model&gt; 显示有关特定模型的详细信息</p><p><strong>foundry model download</strong> &lt;model&gt; 在不运行模型的情况下只下载模型到本地缓存</p><p><strong>foundry model load</strong> &lt;model&gt; 将模型加载到服务中</p><p><strong>foundry model unload</strong> &lt;model&gt; 从服务中卸载模</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 要查看本地已经下载缓存的模型，可执行：</p><p><strong>foundry cache list</strong></p><p><strong><a href="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/Foundry-cache-ls.png"><img width="630" height="103" title="Foundry-cache-ls" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="Foundry-cache-ls" src="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/Foundry-cache-ls_thumb.png" border="0"></a></strong></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 要检查 Foundry Local 服务状态，可执行：</p><p><strong>foundry service status</strong></p><p><strong><a href="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/Foundry-service-status.png"><img width="630" height="98" title="Foundry-service-status" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="Foundry-service-status" src="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/Foundry-service-status_thumb.png" border="0"></a></strong></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Foundry Local CLI 详细使用可参考：<a href="https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-local/reference/reference-cli/?WT.mc_id=WDIT-MVP-4000544" target="_blank">Foundry Local CLI reference &#124; Microsoft Learn</a></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-local/reference/reference-sdk/?WT.mc_id=WDIT-MVP-4000544" target="_blank">Foundry Local SDK</a> 目前支持 JavaScript、Python、C# 和 Rust，也可以使用 <a href="https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-local/reference/reference-resthttps://learn.microsoft.com/en-us/azure/ai-foundry/foundry-local/reference/reference-rest/?WT.mc_id=WDIT-MVP-4000544" target="_blank">REST API</a> 去调用 Foundry Local Service。<a href="https://goxia.maytide.net" target="_blank">gOxiA</a> 这几天就用官方的样例代码改了一个支持 Windows 和 macOS 跨平台运行的 AI 推理程序，可在启动后自动检测 Foundry Local 运行状态获取服务地址和端口，并列出可用 AI 模型，如果未在运行，则执行 Foundry Local 启动。也可以手动指定 Foundry Local 地址，或配置 Azure AI 接口使用基于云的模型。</p><p><a href="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/FoundryLocalChatDemo.png"><img width="630" height="571" title="FoundryLocalChatDemo" style="border: 0px currentcolor; border-image: none; display: inline; background-image: none;" alt="FoundryLocalChatDemo" src="http://goxia.maytide.net/ftpup/2025/c62ddf2dac1b_A68F/FoundryLocalChatDemo_thumb.png" border="0"></a></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 项目地址：<a href="https://github.com/goxia/Tools/tree/main/FoundryLocalChat" target="_blank">FoundryLocalChat &#124; Github</a></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundryLocalChat 视频演示：<a title="http://t.cn/AXw2NWB1" href="http://t.cn/AXw2NWB1">http://t.cn/AXw2NWB1</a></p>
]]>
</description>
</item>
</channel>
</rss>