There is no scp path to a stock iPhone. CoreML .mlpackage files ship inside an iOS app bundle through Xcode, deployed via local install, TestFlight, or App Store. This page walks the bundle path. You need a Mac, Xcode, and a paid Apple Developer Program account for any iOS path beyond a 7-day personal-team install.
CoreML conversion runs on a Mac, not the phone. Use a venv. coremltools ships the converter and the model-runner used at export time.
$ python3 -m venv ~/kolm-coreml $ source ~/kolm-coreml/bin/activate $ pip install --upgrade pip $ pip install coremltools # sanity check $ python -c "import coremltools; print(coremltools.__version__)"
Also install Xcode from the App Store. Xcode 15 or later is required for iOS 17 deployment targets.
.kolm.Run on the Mac. CoreML export produces an .mlpackage directory that Xcode treats as a resource. Quantization tier is honored.
$ kolm export your-artifact.kolm \ --backend coreml \ --device "iPhone 15 Pro (8GB)" \ --quant int4 \ --out ./exports/
The output is ./exports/your-artifact-int4.mlpackage. This is the file Xcode needs.
Create or open an iOS app target in Xcode. Drag the .mlpackage into the Project Navigator. When prompted, check the box for your app target under Target Membership and use the Copy Items If Needed option.
In Swift, the bundled package is auto-generated as a class with the same name as the file (without the extension). Load and run:
import CoreML do { let config = MLModelConfiguration() config.computeUnits = .all // CPU + GPU + Neural Engine let model = try YourArtifactInt4(configuration: config) let result = try model.prediction(input: input) print(result.output) } catch { print("CoreML inference failed: \\(error)") }
Two deployment paths:
.ipa files outside the App Store or TestFlight in the US App Store (EU has third-party stores via the Digital Markets Act). If you need to ship an LLM to consumer iPhones at scale, this is the path. For an internal app at a single company, TestFlight internal testing is the right path and is free with a paid Developer account.Run verification on the Mac before bundling. The .kolm manifest stamps the quant tier, the K-score on the embedded eval pack, and the SHA-256 of the resulting payload. A reviewer can recompute everything later.
$ kolm verify your-artifact.kolm --binder report.html
For reviewer-grade evidence, /verify-prod accepts the same .kolm in the browser and runs the same six checks.