Foundation Models profiling with Xcode Instruments
How to profile Foundation Models in Xcode 26 Instruments: use the Foundation Models instrument to see asset loading, session timings, and token counts; capture tool-call time. Optimize with LanguageModelSession.prewarm(promptPrefix:), caching, prompt tweaks. Notes 4,096-token cap, simulator token bug—use devices.