- Notifications
You must be signed in to change notification settings - Fork61
Chat with your favourite LLaMA models in a native macOS app
License
alexrozanski/LlamaChat
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
LlamaChat is a macOS app that allows you to chat withLLaMA,Alpaca andGPT4All models all running locally on your Mac.
LlamaChat requires macOS 13 Ventura, and either an Intel or Apple Silicon processor.
Download a.dmg
containing the latest version👉 here 👈.
git clone https://github.com/alexrozanski/LlamaChat.gitcd LlamaChatopen LlamaChat.xcodeproj
NOTE: LlamaChat includesSparkle for autoupdates, which will fail to load if LlamaChat is not signed. Ensure that you use a valid signing certificate when building and running LlamaChat.
NOTE: model inference runs really slowly in Debug builds, so if building from source make sure that theBuild Configuration
inLlamaChat > Edit Scheme... > Run
is set toRelease
.
- Supported Models: LlamaChat supports LLaMA, Alpaca and GPT4All models out of the box. Support for other models includingVicuna andKoala is coming soon. We are also looking for Chinese and French speakers to add support forChinese LLaMA/Alpaca andVigogne.
- Flexible Model Formats: LLamaChat is built on top ofllama.cpp andllama.swift. The app supports adding LLaMA models in either their raw
.pth
PyTorch checkpoints form or the.ggml
format. - Model Conversion: If raw PyTorch checkpoints are added these can be converted to
.ggml
files compatible with LlamaChat and llama.cpp within the app. - Chat History: Chat history is persisted within the app. Both chat history and model context can be cleared at any time.
- Funky Avatars: LlamaChat ships with7 funky avatars that can be used with your chat sources.
- Advanced Source Naming: LlamaChat uses Special Magic™ to generate playful names for your chat sources.
- Context Debugging: For the keen ML enthusiasts, the current model context can be viewed for a chat in the info popover.
NOTE: LlamaChat doesn't ship with any model files and requires that you obtain these from the respective sources in accordance with their respective terms and conditions.
- Model formats: LlamaChat allows you to use the LLaMA family of models in either their raw Python checkpoint form (
.pth
) or pre-converted.ggml
file (the format used byllama.cpp, which powers LlamaChat). - Using LLaMA models: When importing LLaMA models in the
.pth
format:- You should select the appropriate parameter size directory (e.g.
7B
,13B
etc) in the conversion flow, which includes theconsolidated.NN.pth
andparams.json
files. - As per the LLaMA model release, the parent directory should contain
tokenizer.model
. E.g. to use the LLaMA-13B model, your model directory should look something like the below, and you should select the13B
directory:
- You should select the appropriate parameter size directory (e.g.
.│ ...├── 13B│ ├── checklist.chk.txt│ ├── consolidated.00.pth│ ├── consolidated.01.pth│ └── params.json│ ...└── tokenizer.model
- Troubleshooting: If using
.ggml
files, make sure these are up-to-date. If you run into problems, you may need to use the conversion scripts fromllama.cpp:- For the GPT4All model, you may need to useconvert-gpt4all-to-ggml.py
- For the Alpaca model, you may need to useconvert-unversioned-ggml-to-ggml.py
- You may also need to usemigrate-ggml-2023-03-30-pr613.py as well. For more information check out thellama.cpp repo.
Pull Requests and Issues are welcome and much appreciated. Please make sure to adhere to theCode of Conduct at all times.
LlamaChat is fully built using Swift and SwiftUI, and makes use ofllama.swift under the hood to run inference and perform model operations.
The project is mostly built using MVVM and makes heavy use of Combine and Swift Concurrency.
LlamaChat is licensed under theMIT license.
About
Chat with your favourite LLaMA models in a native macOS app