NSCache
Asked on 01/09/2025
1 search
The context provided does not mention NSCache specifically. However, it does discuss the use of caching techniques in the context of machine learning models, particularly the use of a key-value cache (KV cache) to improve the efficiency of transformer models on Apple silicon. This technique is used to store key and value vectors to avoid redundant calculations, thereby speeding up the decoding process in large language models.
If you are interested in learning more about caching techniques in machine learning models on Apple platforms, you might want to check out the session titled "Bring your machine learning and AI models to Apple silicon," which discusses transformer optimization and the use of stateful models to enhance performance. You can find more details in the chapter on Transformer optimization.
For more information on this topic, you can refer to the session Bring your machine learning and AI models to Apple silicon (17:08).

Accelerate machine learning with Metal
Learn how to accelerate your machine learning transformer models with new features in Metal Performance Shaders Graph. We’ll also cover how to improve your model’s compute bandwidth and quality, and visualize it in the all new MPSGraph viewer.

What’s new in SwiftData
SwiftData makes it easy to add persistence to your app with its expressive, declarative API. Learn about refinements to SwiftData, including compound uniqueness constraints, faster queries with #Index, queries in Xcode previews, and rich predicate expressions. Join us to explore how you can use all of these features to express richer models and improve performance in your app. To discover how to build a custom data store or use the history API in SwiftData, watch “Create a custom data store with SwiftData” and “Track model changes with SwiftData history”.

Track model changes with SwiftData history
Reveal the history of your model’s changes with SwiftData! Use the history API to understand when data store changes occurred, and learn how to use this information to build features like remote server sync and out-of-process change handing in your app. We’ll also cover how you can build support for the history API into a custom data store.