# 在 iPhone / iOS 上运行 FastVLM

以 Apple 官方 iOS/macOS Demo 项目作为端侧 FastVLM 应用的起点。

Canonical URL: https://aiidelist.com/zh/blog/fastvlm-ios-coreml-zh

Language: zh

Published: 2026-09-24

Updated: 2026-09-24

FASTVLM 指南 · iPhone

以 Apple 官方 iOS/macOS Demo 项目作为端侧 FastVLM 应用的起点。

[全部 FastVLM 指南](/zh/fastvlm#guides)

## 运行前准备

官方应用要求 macOS 15.2+ 或 iOS 18.2+，以及兼容的 Xcode。先下载模型，再构建应用。首次下载使用空模型目录；切换型号前，将已有自定义模型另行保存。

### 检查首次运行结果

在 Xcode 中选择目标设备，iPhone 配置签名，再构建并运行。对图片或摄像头画面提问，检查生成的回答和应用中的 TTFT。

[Stage2 / Stage3 与 Apple Silicon 文件说明 →](/zh/blog/fastvlm-1-5b-stage3-zh#stage3)

来源核对于 2026-09-12。实际运行性能取决于设备。

## 操作步骤

1. 使用 Apple Demo 项目，不要假设系统提供 FastVLM API。
2. 按仓库说明下载模型。
3. 使用兼容的 Xcode 工具链打开并构建。
4. 在每台目标设备上测量内存和延迟。

## 示例

iPhone

```text
git clone https://github.com/apple-aiml-research/ml-fastvlm.git
cd ml-fastvlm
chmod +x app/get_pretrained_mlx_model.sh
app/get_pretrained_mlx_model.sh --model 0.5b --dest app/FastVLM/model
open app/FastVLM/FastVLM.xcodeproj
# Select an iOS 18.2+ device, configure signing, then Build and Run.
```

### 使用一手资料复核

API、模型文件和依赖版本都可能变化。请把本页作为实现路线，并在链接的官方文档中确认当前命令与许可。

[打开官方来源](https://github.com/apple/ml-fastvlm/tree/main/app/FastVLM)

## 使用 Core ML 部署 FastVLM

FASTVLM 指南 · Core ML

查看 Apple 发布的 Core ML 资源，并针对目标硬件有意识地选择量化方式。

[全部 FastVLM 指南](/zh/fastvlm#guides)

## 操作步骤

1. 在官方 FastVLM Collection 中确认 Core ML 资源。
2. 按目标设备匹配模型规模与量化方式。
3. 先在小型测试应用中集成模型包。
4. 分别测试冷启动与热启动。

## 示例

Core ML

```text
// Add the downloaded .mlpackage to your Xcode target
// and let Xcode generate the typed model interface.
```

### 使用一手资料复核

API、模型文件和依赖版本都可能变化。请把本页作为实现路线，并在链接的官方文档中确认当前命令与许可。

[打开官方来源](https://huggingface.co/collections/apple/fastvlm-68ca64a85e3c2a03f32a7098)
