{"slug": "show-hn-fixing-grammar-and-spelling-using-on-device-apple-foundation-model", "title": "Show HN: Fixing grammar and spelling using on-device Apple Foundation Model", "summary": "A developer released an open-source tool that uses Apple's on-device Foundation Model to fix grammar and spelling on Apple Silicon Macs. The tool, built with Swift and exposed via a C function, runs locally without sending data to the cloud. It demonstrates practical use of Apple's on-device language model for writing tasks.", "body_md": "Grammar and spelling-fixing tool using Apple's Foundation Model, run locally on any Apple Silicon Macs.\n\nBuild the binary with:\n\n``` bash\n$ make\n```\n\nYou will need to have Xcode installed to compile the Swift LLM bridge. The output of the build process is a `grammar-fix`\n\nbinary that you can run.\n\nRun the command and pass the input string:\n\n```\n$ /grammar-fix \"he eat two apple\"\n\n# output: He ate two apples.\n```\n\nFor a while now, Apple devices shipped with an [on-device language model](https://developer.apple.com/documentation/foundationmodels/systemlanguagemodel). The model can be used for some writing tasks, but it's only accessible for Swift via the Foundation Models framework.\n\nThis project [bridged](https://github.com/huytd/afm-grammar/blob/main/LLMBridge.swift) the API and expose it as a [C function](https://github.com/huytd/afm-grammar/blob/main/LLMBridge.h), so we can use it for simple tasks like fixing grammar.", "url": "https://wpnews.pro/news/show-hn-fixing-grammar-and-spelling-using-on-device-apple-foundation-model", "canonical_source": "https://github.com/huytd/afm-grammar/", "published_at": "2026-06-16 23:03:52+00:00", "updated_at": "2026-06-16 23:23:13.471581+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "natural-language-processing"], "entities": ["Apple", "Apple Silicon", "Foundation Model", "Xcode", "Swift", "LLM Bridge", "grammar-fix"], "alternates": {"html": "https://wpnews.pro/news/show-hn-fixing-grammar-and-spelling-using-on-device-apple-foundation-model", "markdown": "https://wpnews.pro/news/show-hn-fixing-grammar-and-spelling-using-on-device-apple-foundation-model.md", "text": "https://wpnews.pro/news/show-hn-fixing-grammar-and-spelling-using-on-device-apple-foundation-model.txt", "jsonld": "https://wpnews.pro/news/show-hn-fixing-grammar-and-spelling-using-on-device-apple-foundation-model.jsonld"}}