LlamaChat

alexrozanskiMIT更新放缓

在 macOS 原生应用里直接和本地 LLaMA 模型对话,支持 llama.cpp,不用折腾命令行就能跑起来。

Chat with your favourite LLaMA models in a native macOS app

1.2.0发布于 2023-04-21 12:16 UTC1,503star58fork同步于 2026-11-07 07:31 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/alexrozanski/LlamaChat.git
cd LlamaChat
open LlamaChat.xcodeproj
硬件要求按 README 说明

需要 macOS 13 Ventura,Intel 或 Apple Silicon 处理器均可;README 未说明具体显存要求。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

在 Mac 上本地运行 LLaMA、Alpaca、GPT4All 模型的 macOS 聊天客户端

在 macOS 原生应用里直接和本地 LLaMA 模型对话,支持 llama.cpp,不用折腾命令行就能跑起来。

核心能力

  • 基于 llama.cpp 与 llama.swift 本地推理
  • 支持 .pth 原始权重与 .ggml 两种格式
  • 可在应用内把 PyTorch 权重转换为 .ggml
  • 持久化聊天历史并可随时清空上下文
  • 可查看当前模型上下文用于调试

容易踩的坑

应用不附带任何模型文件,需自行按各自条款获取;从源码构建需有效签名证书,否则 Sparkle 自动更新会加载失败;Debug 构建推理极慢,需在 Scheme 中把 Build Configuration 设为 Release;使用 .ggml 文件需确保格式较新,必要时用 llama.cpp 的转换脚本处理。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

4 个版本1.2.0
  1. 1.2.0v1.2.0: Model Hyperparameters ⚡️最新正式版2023-04-21 · 2023-04-21 12:16 UTC

    Happy Friday! This is the v1.2.0 release of LlamaChat, and the big update this week is support for configuring ✨ model hyperparameters ✨, alongside a bunch of other tweaks and improvements.

    🔥 New

    • You can now configure the model hyperparameters (including context size and sampling parameters like top-p and top-k values) for all of your chat sources in Settings > Sources. These parameters still default to sensible values for each model type, allowing you to tweak them as you see fit (#13).
    • You can now configure the number of threads that LlamaChat runs text generation on from Settings > General (#13).
    • You can now configure whether the model for each chat source is fully loaded into memory during prediction, which can improve performance for smaller models. If you're familiar with llama.cpp this controls the --mlock parameter. (#4)

    🫧 Improved

    • You can now import older .ggml files directly into LlamaChat without conversion, thanks to some upstream changes made to llama.cpp. (#3)
    • The chat view has been revamped with slicker message bubbles and animations. It also automatically scrolls to the bottom when new messages are added. (#18)
    • The File menu has been improved: you can now add new sources with ⌘N.
    • The Add Chat Source flow has been improved to make it (almost) pixel-perfect, and a dedicated Cancel button has been added to make it clearer how to exit (previously this could be done with Esc). (#7)

    🐞 Bug Fixes

    • Previously when converting PyTorch checkpoints directly in LlamaChat, an intermediary converted (but un-quantized) .ggml artefact was left on the filesystem. This has now been fixed, and any of these artefacts left by previous versions of LlamaChat are automatically cleaned up by on launch. (#10)

    ❤️ Sponsorships

    • Sponsorship positions have been opened to help support the continued development of LlamaChat. Any support is much appreciated, and more info can be found on the sponsorship page.
  2. 1.1.0v1.1.0: Add Sparkle ✨2023-04-13 · 2023-04-13 14:34 UTC
    查看更新说明
    • Adds the Sparkle framework to support automatic updates going forward
    • Makes minor adjustments to the release scripts in Scripts/
    • Fixes #5
    • Updates the README
  3. 1.0.1v1.0.1: Fix Chat Source persistence2023-04-12 · 2023-04-12 12:05 UTC
    查看更新说明

    This release fixes a few niggly issues, as well as an issue related to Chat Sources (#1):

    • Fixes persistence of Chat Sources (#1) - this was broken if there were any sources without avatars
    • Makes text in message bubbles selectable (#2)
    • Other minor changes to the repo and setup since v1.0 tag
  4. 1.0v1.0: Hello LlamaChat 🙌2023-04-11 · 2023-04-11 12:05 UTC
    查看更新说明

    This is the v1.0 release of LlamaChat, which allows you to run LLaMA-compatible model files in a native macOS chat-style app.

    LlamaChat currently supports models from:

    LlamaChat supports models in both the raw PyTorch checkpoint format (.pth) as well as the .ggml format, since LlamaChat is powered by the ggml and llama.cpp and llama.swift libraries.

    Features

    • Import .pth and .ggml models with support for pre-converting .pth files directly within the app. Note that some manual intervention may be necessary in the case of outdated .ggml model files; please see the llama.cpp repository for more.
    • Chat with LLaMA-compatible models in a native macOS chat-style interface. Messages are stored between sessions.
    • Support for fun Llama and Alpaca avatars to make the chat experience more fun ✌️
    • Inspect and debug model context including raw tokens.
    • Clear model context and chat history on demand.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    LlamaChat banner

    LlamaChat is a macOS app that allows you to chat with LLaMA, Alpaca and GPT4All models all running locally on your Mac.

    🚀 Getting Started

    LlamaChat requires macOS 13 Ventura, and either an Intel or Apple Silicon processor.

    Direct Download

    Download a .dmg containing the latest version 👉 here 👈.

    Building from Source

    git clone https://github.com/alexrozanski/LlamaChat.git
    cd LlamaChat
    open LlamaChat.xcodeproj
    

    NOTE: LlamaChat includes Sparkle 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 the Build Configuration in LlamaChat > Edit Scheme... > Run is set to Release.

    ✨ Features

    • Supported Models: LlamaChat supports LLaMA, Alpaca and GPT4All models out of the box. Support for other models including Vicuna and Koala is coming soon. We are also looking for Chinese and French speakers to add support for Chinese LLaMA/Alpaca and Vigogne.
    • Flexible Model Formats: LLamaChat is built on top of llama.cpp and llama.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 with 7 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.

    🔮 Models

    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 by llama.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 the consolidated.NN.pth and params.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 the 13B directory:
    .
    │   ...
    ├── 13B
    │   ├── checklist.chk.txt
    │   ├── consolidated.00.pth
    │   ├── consolidated.01.pth
    │   └── params.json
    │   ...
    └── tokenizer.model
    

    👩‍💻 Contributing

    Pull Requests and Issues are welcome and much appreciated. Please make sure to adhere to the Code of Conduct at all times.

    LlamaChat is fully built using Swift and SwiftUI, and makes use of llama.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.

    ⚖️ License

    LlamaChat is licensed under the MIT license.