rudrankriyam/Foundation-Models-Framework-Lab
A practical lab for building, testing, and evaluating apps with Apple's Foundation Models framework.
What it solves
Foundation Lab provides a native iOS and macOS workbench for developers to learn, test, and deploy applications using Apple's Foundation Models framework. It eliminates the need to write boilerplate code for every experiment by centralizing prompts, configurations, tools, and execution evidence in a single interface.
How it works
The project operates as a native application with three main areas:
- Library: A collection of editable recipes, guided labs, and workshops that demonstrate specific API capabilities.
- Playground: An interactive environment to compose prompts, configure model sampling and reasoning, integrate tools, and export configurations as Swift code.
- Runs: A diagnostic area to inspect persisted run history, including token usage, timing, and tool calls.
It integrates with Apple Silicon for on-device execution and supports advanced features like adapter comparison (comparing a base model against a fine-tuned adapter) and RAG (Retrieval-Augmented Generation) using semantic retrieval.
Who it’s for
It is designed for iOS and macOS developers who are building AI-powered applications using Apple's native AI frameworks and those wanting to experiment with on-device LLMs and Apple Intelligence.
Highlights
- Integrated Tooling: Includes ready-made tool recipes for Weather, Calendar, Contacts, HealthKit, and web search.
- Adapter Studio: Tools for training and exporting model adapters (
.fmadapter) to compare performance against base models. - Structured Output: Support for dynamic schemas, nested objects, and invoice extraction using
@Generablemodels. - Xcode 27 Integration: Early access labs for Private Cloud Compute, image attachments, and explicit tool-calling modes.
- RAG Capabilities: Built-in document indexing and semantic retrieval via LumoKit and VecturaKit.