Foundation Lab क्या है?
Foundation Lab Apple के on-device Foundation Models पर prompts, tools और adapters को चलाने, जाँचने और तुलना करने के लिए एक native iOS और macOS वर्कबेंच. यह Models & Inference टूल्स की Local Runtimes श्रेणी में आता है; ओपन सोर्स है, Swift में लिखा गया है और MIT लाइसेंस के तहत है।
सारांश
Foundation Lab एक native iOS और macOS ऐप है, जिससे Apple के Foundation Models framework के साथ सीखना, टेस्ट करना और प्रोडक्शन में भेजना आसान होता है। यह Swift API है जो Apple Intelligence में बने language model को एक्सपोज़ करता है। यह prompt, कॉन्फ़िगरेशन, tools, transcript और हर run के नतीजे एक ही जगह रखता है, ताकि on-device model पर किया गया कोई प्रयोग बिना पहले एक अस्थायी ऐप लिखे खोला, बदला और दोबारा चलाया जा सके।

इस ऐप की तीन जगहें हैं। Library में 18 editable recipes, 14 guided labs, तीन workshops और सेव किए गए experiments हैं। Playground में prompts, instructions, sampling, reasoning और tools कॉन्फ़िगर होते हैं, responses stream होकर आते हैं, और किसी कॉन्फ़िगरेशन को Swift में export किया जा सकता है। Runs में हर run की status, कॉन्फ़िगरेशन, transcript events, tool calls, timing और token usage रहते हैं। नौ तैयार tool recipes — मौसम, वेब सर्च, संपर्क, कैलेंडर, रिमाइंडर, लोकेशन, HealthKit, Apple Music और वेब मेटाडेटा — companion FoundationModelsTools package से आते हैं।
Live model runs के लिए Apple Silicon चाहिए, जिसमें iOS 26 या macOS 26 पर Apple Intelligence चालू हो; simulator builds सिर्फ़ compile करने और interface जाँचने के लिए हैं। Xcode 27 से build करने पर ऐप OS 27 APIs के लिए labs जोड़ता है, जिनमें Private Cloud Compute, image attachments, explicit tool-calling modes, reasoning controls और context-budget visualization शामिल हैं। macOS पर Adapter Comparison workspace एक ही prompt को base model और एक `.fmadapter` के साथ साथ-साथ चलाता है, जबकि training और export बंडल्ड `fmas` CLI में होते हैं। यह प्रोजेक्ट MIT license के तहत है और Swift में लिखा गया है।
यह क्या करता है
- 18 editable recipes, 14 guided labs और तीन workshops की Library, जो सीधे एक चलने योग्य experiment में खुलती है
- Playground, जिसमें editable instructions, sampling, response limits, runtime और reasoning controls, streaming output और voice input है

- Playground कॉन्फ़िगरेशन का Swift export, ताकि एक experiment ऐप का कोड बन जाए
- Runs view, जिसमें हर run के लिए सहेजे गए transcript events, tool calls, timing और token usage दिखते हैं
- नौ built-in tools (मौसम, वेब सर्च, संपर्क, कैलेंडर, रिमाइंडर, लोकेशन, HealthKit, Apple Music, वेब मेटाडेटा), और कोई भी tool user data बदलने से पहले confirmation माँगता है
- @Generable models, @Guide constraints और dynamic schemas के साथ structured-output examples, साथ ही RAG document indexing
- Private Cloud Compute, image input, tool-calling modes, transcript inspection और context budgets के लिए Xcode 27 labs

- macOS पर Adapter Comparison: base model और एक .fmadapter साथ-साथ चलते हैं, पहला token आने तक का समय और कुल duration के साथ; training और export के लिए fmas CLI
शुरू करें
Foundation Lab को Xcode 26.6 या Xcode 27 में source से build किया जाता है (TestFlight beta भी उपलब्ध है)। Live runs के लिए Apple Intelligence चालू किया हुआ physical Apple Silicon device चाहिए।
Project clone करें और खोलें
Xcode project खोलें और Mac या compatible iPhone/iPad पर Foundation Lab scheme चलाएँ।
git clone https://github.com/rudrankriyam/Foundation-Models-Framework-Lab.git
cd Foundation-Models-Framework-Lab
open FoundationLab.xcodeprojया command line से build करें
वही scheme macOS और iOS Simulator दोनों के लिए code signing के बिना build होती है। Simulator builds सिर्फ़ compilation और interface जाँचते हैं; वे model नहीं चला सकते।
xcodebuild \
-project FoundationLab.xcodeproj \
-scheme 'Foundation Lab' \
-destination 'generic/platform=macOS' \
CODE_SIGNING_ALLOWED=NO \
buildएक recipe चलाएँ, फिर एक चीज़ बदलें
Library में कोई recipe चुनें। वह Playground में खुलती है, जहाँ आप prompt, instructions या tools बदल सकते हैं, उसे चला सकते हैं, experiment के रूप में सेव कर सकते हैं और Runs में नतीजा देख सकते हैं।
Library → New Experiment / One-shot Prompt / Tool-Enabled Assistant → Playground → Runsएक adapter ट्रेन और तुलना करें (macOS)
Adapter training और export Tools/AdapterStudio में fmas CLI से होते हैं; बना हुआ .fmadapter Adapter Comparison workspace में import किया जा सकता है।
python3.11 -m venv .venv-fmas
source .venv-fmas/bin/activate
python -m pip install -e Tools/AdapterStudio
fmas init
fmas setup
fmas train-adapter --helpकमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।
कब इस्तेमाल करें
- किसी feature को उस पर बनाने से पहले जानें कि Apple का on-device model क्या कर सकता है और क्या नहीं
- Contacts, Calendar या HealthKit के खिलाफ tool-calling assistant का prototype बनाएँ और काम करने वाले setup को Swift में export करें
- Foundation Models session के transcript events, tool calls और token usage पढ़कर उसे debug करें
- जाँचें कि कोई custom adapter उसी prompt पर base model से सच में बेहतर है या नहीं
- guided labs के ज़रिए Xcode 27 Foundation Models APIs सीखें
How Foundation Lab compares
Foundation Lab alongside other open-source local runtimes tools AI/TLDR tracks, ranked by GitHub stars.
| टूल | स्टार | यह क्या करता है |
|---|---|---|
| Ollama | ★ 189k | टर्मिनल से ही open LLMs को अपनी मशीन पर डाउनलोड करें और चलाएं |
| llama.cpp | ★ 137k | कम मेमोरी के साथ CPU, Apple Silicon और GPU पर C/C++ में LLM चलाएँ |
| GPT4All | ★ 77.3k | बड़े भाषा मॉडल (LLM) को रोज़मर्रा के लैपटॉप और डेस्कटॉप पर निजी तौर पर चलाएं |
| Colibrì | ★ 54.3k | एक pure-C inference इंजन, जो Mixture-of-Experts वज़न को डिस्क से स्ट्रीम करता है, ताकि फ़्रंटियर-साइज़ मॉडल आम हार्डवेयर पर चल सकें |
| LocalAI | ★ 50.7k | सेल्फ़-होस्टेड, OpenAI-compatible API, जो LLM, विज़न, वॉइस और इमेज मॉडल को लोकल रूप से चलाने देता है |
| Strata | ★ 50k | एक क्लिक वाला लोकल inference engine, जो 12 GB ग्राफ़िक्स कार्ड वाले गेमिंग PC पर 125B Qwen3.8-Flash-Next चलाता है |
| Jan | ★ 46.3k | अपने कंप्यूटर पर ओपन सोर्स LLM को ऑफ़लाइन चलाएँ, निजी ChatGPT की तरह |
| Foundation Lab | ★ 1.2k | Apple के on-device Foundation Models पर prompts, tools और adapters को चलाने, जाँचने और तुलना करने के लिए एक native iOS और macOS वर्कबेंच |
