Skip to content

huytd/afm-grammar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors