█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Foundation Lab

Apple के on-device Foundation Models पर prompts, tools और adapters को चलाने, जाँचने और तुलना करने के लिए एक native iOS और macOS वर्कबेंच

Local Runtimesओपन सोर्स
भाषा
Swift
लाइसेंस
MIT
संक्षेप में

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 पर किया गया कोई प्रयोग बिना पहले एक अस्थायी ऐप लिखे खोला, बदला और दोबारा चलाया जा सके।

Foundation Lab for macOS showing the Library with ready-made recipes such as One-shot Prompt, Streaming Response and tool examples like Weather and Web Search
The Library: every recipe opens in Playground, ready to edit and run.Foundation Lab README ↗

इस ऐप की तीन जगहें हैं। 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 है
Foundation Lab Playground on macOS with runtime, reasoning, sampling, instructions and tool toggles in the right-hand panel
Playground: runtime, reasoning, generation settings, instructions and tools beside the conversation.Foundation Lab README ↗
  • 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
Foundation Lab Xcode 27 workshop listing labs for model runtime, context window, Private Cloud Compute, image input, tool modes and agent security
The Xcode 27 workshop groups the labs for the OS 27 APIs.Foundation Lab README ↗
  • 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 चलाएँ।

bashbash
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 नहीं चला सकते।

bashbash
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 किया जा सकता है।

bashbash
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.2kApple के on-device Foundation Models पर prompts, tools और adapters को चलाने, जाँचने और तुलना करने के लिए एक native iOS और macOS वर्कबेंच