GitHub - huytd/afm-grammar: Fix grammar and spelling using Apple Foundation Model · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
huytd
afm-grammar
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>4 Commits<br>4 Commits
.gitignore
.gitignore
LICENSE
LICENSE
LLMBridge.h
LLMBridge.h
LLMBridge.swift
LLMBridge.swift
Makefile
Makefile
README.md
README.md
main.c
main.c
View all files
Repository files navigation
afm-grammar
Grammar and spelling-fixing tool using Apple's Foundation Model, run locally on any Apple Silicon Macs.
How to compile
Build the binary with:
$ make
You will need to have Xcode installed to compile the Swift LLM bridge. The output of the build process is a grammar-fix binary that you can run.
How to use
Run the command and pass the input string:
$ /grammar-fix "he eat two apple"
# output: He ate two apples.
What is this and how does it work?
For a while now, Apple devices shipped with an on-device language model. The model can be used for some writing tasks, but it's only accessible for Swift via the Foundation Models framework.
This project bridged the API and expose it as a C function, so we can use it for simple tasks like fixing grammar.
About
Fix grammar and spelling using Apple Foundation Model
Topics
grammar
spelling
apple-foundation-models
Resources
Readme
License
BSD-3-Clause license
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
stars
Watchers
watching
Forks
forks
Report repository
Releases
No releases published
Packages
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
46.2%
Makefile<br>27.2%
Swift<br>26.6%
You can’t perform that action at this time.