Loading…
Loading…
DM-JEPA 1.5 ANE is the official Apple Core ML package (.mlpackage) compiled specifically for Apple's dedicated 16-core Apple Neural Engine (ANE) on iPhone, iPad, and Mac.
| Device / Chip | Hardware Unit | Precision | Latency (P50) | Throughput | Footprint |
|---|---|---|---|---|---|
| iPhone 16 / 16 Pro (A18 / A18 Pro) | 16-Core ANE (35 TOPS) | FP16 | 3.8 ms |
263 Hz |
180 MB |
| iPhone 15 Pro (A17 Pro) | 16-Core ANE (35 TOPS) | FP16 | 4.2 ms |
238 Hz |
180 MB |
| iPhone 14 Pro / 15 (A16 Bionic) | 16-Core ANE (17 TOPS) | FP16 | 6.9 ms |
145 Hz |
180 MB |
| iPad Pro / Mac (M4 / M3 / M2) | Apple Silicon ANE + Metal | FP16 | 2.9 ms |
345 Hz |
180 MB |
DMJEPA15_ANE.mlpackage)MLModelConfiguration.computeUnits = .all (prioritizes Apple Neural Engine execution with seamless GPU fallback)state_input_ids: [1, 64] Int32 (Environment state & instructions)state_attention_mask: [1, 64] Int32option_input_ids: [1, 4, 32] Int32 (Up to 4 candidate action descriptions)option_attention_mask: [1, 4, 32] Int32logits: [1, 4] Float16 (Option preference logits)probabilities: [1, 4] Float16 (Softmax choice distribution)metric_energy: [1, 4] Float16 (Riemannian manifold metric distance)Drag DMJEPA15_ANE.mlpackage into your Xcode project navigator and ensure Target Membership is checked for your iOS app.
import CoreML
import Foundation
// 1. Initialize DM-JEPA 1.5 with Neural Engine Priority
let modelURL = Bundle.main.url(forResource: "DMJEPA15_ANE", withExtension: "mlpackage")!
let runner = try DMJEPARunner(modelURL: modelURL)
// 2. Define State and Candidate Actions
let instructions = "Approaching signalized intersection at 45 mph. Traffic signal transitions to Amber 35m ahead."
let options = [
"Execute controlled stop before stop bar with 3.2 m/s^2 deceleration.",
"Accelerate to 52 mph to clear intersection before red phase.",
"Maintain velocity and proceed through intersection during amber."
]
// 3. Tokenize using bundled FastTokenizer
let tokenizer = try FastTokenizer()
let stateIds = tokenizer.encode(instructions)
let optionIds = options.map { tokenizer.encode($0) }
// 4. Run Sub-5ms Decision on Apple Neural Engine
Task {
let result = try await runner.evaluate(
stateIds: stateIds,
optionIds: optionIds,
options: options
)
print("🎯 Selected Action: \(result.bestOption)")
print("Confidence: \(String(format: "%.1f", result.confidence * 100))%")
print("ANE Latency: \(String(format: "%.2f", result.latencyMs)) ms")
}
sin/cos) by indexing static FP16 lookup buffers.[1, 64] and [1, 4, 32] allow the Apple Neural Engine compiler to pre-allocate dedicated SRAM cache lines, avoiding cache misses and DDR DRAM memory thrashing.python dm_jepa_1_5_ios_ane/export_coreml.py \
--checkpoint checkpoints/djepa_v2.0_autonomous_production.pt \
--output dm_jepa_1_5_ios_ane/DMJEPA15_ANE.mlpackage
Licensed under the Apache 2.0 License by DangerLabs.