SystemLanguageModel.Adapter
Specializes the system language model for custom use cases.
Declaration
struct AdapterMentioned in
Overview
Use the base system model for most prompt engineering, guided generation, and tools. If you need to specialize the model, train a custom Adapter to alter the system model weights and optimize it for your custom task. Use custom adapters only if you’re comfortable training foundation models in Python.
For more on custom adapters, see Get started with Foundation Models adapter training.
Topics
Creating an adapter
Loading and using a custom adapter with Foundation Modelscom.apple.developer.foundation-model-adapterinit(fileURL:)init(name:)