apps/iOS/MNNLLMChat/README.md
This project is an iOS application based on the MNN engine, supporting local large-model multimodal conversations.
It operates fully offline with high privacy. Once the models are downloaded to the device, all conversations occur locally without any network uploads or processing.
Click here to download the original resolution introduction video
| Text To Text | Image To Text | Audio To Text | Model Filter |
| Local Model | Model Market | Benchmark | History |
Additionally, the app supports edge-side usage of DeepSeek with Think mode:
Clone the repository:
git clone https://github.com/alibaba/MNN.git
Build the MNN.framework:
sh package_scripts/ios/buildiOS.sh "
-DMNN_ARM82=ON
-DMNN_LOW_MEMORY=ON
-DMNN_SUPPORT_TRANSFORMER_FUSE=ON
-DMNN_BUILD_LLM=ON
-DMNN_CPU_WEIGHT_DEQUANT_GEMM=ON
-DMNN_METAL=ON
-DMNN_BUILD_DIFFUSION=ON
-DMNN_OPENCL=OFF
-DMNN_SEP_BUILD=OFF
-DLLM_SUPPORT_AUDIO=ON
-DMNN_BUILD_AUDIO=ON
-DLLM_SUPPORT_VISION=ON
-DMNN_BUILD_OPENCV=ON
-DMNN_IMGCODECS=ON
-DMNN_BUILD_LLM_OMNI=ON
"
Copy the framework to the iOS project:
mv MNN-iOS-CPU-GPU/Static/MNN.framework apps/iOS/MNNLLMChat
Ensure the Link Binary With Libraries section includes the MNN.framework:
If it's missing, add it manually:
Update iOS signing and build the project:
cd apps/iOS/MNNLLMChat
open MNNLLMiOS.xcodeproj
In Xcode, go to Signing & Capabilities > Team and input your Apple ID and Bundle Identifier:
Wait for the Swift Package to finish downloading before building.
Due to memory limitations on iPhones, it is recommended to use models with 7B parameters or fewer to avoid memory-related crashes.
Here is the professional technical translation of the provided text:
For local debugging, simply drag the model files to the LocalModel folder and run the project:
First, download the MNN-related models from Hugging Face or Modelscope:
Drag the downloaded model folder into the project's LocalModel folder.
For root directory models, you can configure them:
Go to ModelListViewModel.swift for configuration, such as whether to support thinking mode:
// MARK: Config the Local Model here
let modelName = "Qwen3-0.6B-MNN-Inside" // Model name
let localModel = ModelInfo(
modelName: modelName,
tags: [
// MARK: if you know that model support think, uncomment the line
// NSLocalizedString("tag.deepThinking", comment: "Deep thinking tag for local model"), // Whether to support think
NSLocalizedString("tag.localModel", comment: "Local model inside the app")],
categories: ["Local Models"],
vendor: "Local",
sources: ["local": "bundle_root/\(modelName)"],
isDownloaded: true
)
localModels.append(localModel)
ModelStorageManager.shared.markModelAsDownloaded(modelName)
The app will automatically detect and load models from the LocalModel folder without requiring additional configuration.
| | | |
New Features:
| | |
New Features:
| | |