{"id":13697305,"url":"https://github.com/ItsPi3141/alpaca-electron","last_synced_at":"2025-05-03T20:30:28.105Z","repository":{"id":147209255,"uuid":"618612197","full_name":"ItsPi3141/alpaca-electron","owner":"ItsPi3141","description":"The simplest way to run Alpaca (and other LLaMA-based local LLMs) on your own computer","archived":false,"fork":false,"pushed_at":"2024-04-04T14:52:35.000Z","size":16444,"stargazers_count":1308,"open_issues_count":34,"forks_count":146,"subscribers_count":36,"default_branch":"main","last_synced_at":"2025-04-30T02:40:48.591Z","etag":null,"topics":["ai","alpaca","alpaca-electron","app","chat","chatgpt","dalai","docker","electron","electron-app","linux","llama","macos","ui","webui","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ItsPi3141.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T21:26:54.000Z","updated_at":"2025-04-28T19:31:39.000Z","dependencies_parsed_at":"2023-12-04T07:22:18.045Z","dependency_job_id":"8a56f905-23f6-4293-bb6f-29cbbbe98d3e","html_url":"https://github.com/ItsPi3141/alpaca-electron","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsPi3141%2Falpaca-electron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsPi3141%2Falpaca-electron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsPi3141%2Falpaca-electron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsPi3141%2Falpaca-electron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsPi3141","download_url":"https://codeload.github.com/ItsPi3141/alpaca-electron/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252043684,"owners_count":21685468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","alpaca","alpaca-electron","app","chat","chatgpt","dalai","docker","electron","electron-app","linux","llama","macos","ui","webui","windows"],"created_at":"2024-08-02T18:00:55.481Z","updated_at":"2025-05-03T20:30:23.013Z","avatar_url":"https://github.com/ItsPi3141.png","language":"JavaScript","funding_links":[],"categories":["UIs","LLMs ChatUI","JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":["Desktop applications"],"readme":"\u003ch1 align=\"center\"\u003e\n\u003csub\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/ItsPi3141/alpaca-electron/main/icon/alpaca-chat-logo.png?raw=true\" height=144\u003e\n\u003c/sub\u003e\n\u003cbr\u003e\nAlpaca Electron\n\u003c/h1\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://nodejs.org\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.electronjs.org/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Electron-191970?style=for-the-badge\u0026logo=Electron\u0026logoColor=white\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/antimatter15/alpaca.cpp/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Alpaca.cpp-%2300599C.svg?style=for-the-badge\u0026logo=c%2B%2B\u0026logoColor=white\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://discord.gg/W7xwHpPWth\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge\u0026logo=discord\u0026logoColor=white\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ci\u003eAlpaca Electron is built from the ground-up to be the easiest way to chat with the alpaca AI models. No command line or compiling needed!\u003c/i\u003e\u003c/p\u003e\n\u003chr\u003e\n\n# Important:\n**Only windows is current supported for now. The new llama.cpp binaries that support GGUF have not been built for other platforms yet.**  \nIf you would like to help, please makea pull request and update the binaries in `./bin`\n\n## 📃 Features + to-do\n\n- [x] Runs locally on your computer, internet connection is not needed except when downloading models\n- [x] Compact and efficient since it uses [llama.cpp](https://github.com/ggerganov/llama.cpp) as its backend (which supports Alpaca \u0026 Vicuna too)\n- [x] Runs on CPU, anyone can run it without an expensive graphics card\n- [x] No external dependencies required, everything is included in the installer\n- [x] \"Borrowed\" UI from *that* popular chat AI :trollface:\n- [x] Supports Windows, MacOS, and Linux (untested)\n- [x] Docker-ized 🐋\n- [x] Context memory\n- [ ] Chat history\n- [ ] Integration with Stable Diffusion\n- [ ] DuckDuckGo integration for web access\n- [ ] GPU acceleration (cuBLAS \u0026 openBLAS)\n\n## 🎞 Demo\n\n![Demonstration](https://github.com/ItsPi3141/alpaca-electron/raw/main/demo.gif)\n\n## 🚀 Quick Start Guide\n\n1. Download an Alpaca model (7B native is recommended) and place it somewhere on your computer where it's easy to find.\n\u003e **Note**  \n\u003e Download links will not be provided in this repository.\n\n2. Download the latest installer from the [releases page](https://github.com/ItsPi3141/alpaca-electron/releases) section.\n\n3. Open the installer and wait for it to install.\n\n4. Once done installing, it'll ask for a valid path to a model. Now, go to where you placed the model, hold shift, right click on the file, and then click on \"Copy as Path\". Then, paste this into that dialog box and click `Confirm`. \n\n5. The program will automatically restart. Now you can begin chatting!\n\n\u003e **Note**  \n\u003e The program will also accept any other 4 bit quantized .bin model files. If you can find other .bin Alpaca model files, you can use them instead of the one recommended in the Quick Start Guide to experiment with different models. As always, be careful about what you download from the internet.\n\n## 🔧 Troubleshooting\n\n### General\n- If you get an error that says \"Invalid file path\" when pasting the path to the model file, you probably have some sort of misspelling in there. Try copying the path again or using the file picker.\n- If you get an error that says \"Couldn't load model\", your model is probably corrupted or incompatible. Try downloading the model again.\n- If you face other problems or issues not listed here, create an issue in the \"Issues\" tab at the top of this page. Describe in detail what happens, and include screenshots. \n\n### Windows\n- If the model has been loaded into RAM but text generation doesn't seem start, [check](https://ark.intel.com/content/www/us/en/ark.html#@Processors) to see if your CPU is compatible with the [AVX2](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/002/intel-advanced-vector-extensions-2-intel-avx2/) instruction set. If it does not support AVX2, Alpaca Electron will use AVX instead, which is much slower so be patient. \n- If you get an error saying \"vcruntime140_1.dll is missing\" or nothing happens at all and the model was not loaded into RAM, try installing the [Microsoft Visual C++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe). \n\n### MacOS\n- If you get an error that says \"App can't be opened because it is from an unidentified developer.\", go to the Applications folder. Then, hold the control key and click on the app. Then click \"Open\", then click \"Open\" when it gives you a warning. Your preference will be saved and MacOS will let you open the app normally from now on. \n- If the above method does not work, try running the following command in terminal: `xattr -cr /Applications/Alpaca\\ Electron.app/`\n\n### Linux\n\n- You can either download the prebuilt app (packaged as tar.gz) from the releases page, extract it and execute it with ```./\"alpaca electron\"``` or build the application on yourself.\n\n- If you want to build the application yourself:\n\u003eClone the repository:\n\u003e\n\u003e```git clone https://github.com/ItsPi3141/alpaca-electron.git```\n\u003e\n\u003eChange your current directory to alpaca-electron:\n\u003e\n\u003e```cd alpaca-electron```\n\u003e\n\u003eInstall application specific dependencies: \n\u003e\n\u003e```npm install --save-dev```\n\u003e\n\u003eBuild the application:\n\u003e\n\u003e```npm run linux-x64```\n\u003e\n\u003eChange your current directory to the build target:\n\u003e\n\u003e```cd release-builds/'Alpaca Electron-linux-x64'```\n\u003e\n\u003eRun the application with ```./'Alpaca Electron'```\n\n### Docker Compose\n\n- You can run this electron application with docker compose. Therefore you need to compelete the following steps:\n\n\u003eClone the repository:\n\u003e\n\u003e```git clone https://github.com/ItsPi3141/alpaca-electron.git```\n\u003e\n\u003eChange your current directory to alpaca-electron:\n\u003e\n\u003e```cd alpaca-electron```\n\u003e\n\u003eBuild the container image:\n\u003e\n\u003e```docker compose build```\n\u003e\n\u003eRun the application container:\n\u003e\n\u003e```docker compose up -d```\n\n- If no window opens up run ```docker compose up``` (without the -d). If there is an error like ```Authorization required, but no authorization protocol specified``` run ```xhost local:root``` on your docker host.\n\n## ⚒️ Building\n\n### Prerequisites \n- [Node.js](https://node.org)\n- [Git](https://git-scm.com)\n- If you're on Windows and are planning on building llama.cpp binaries also, [CMake](https://cmake.org).\n\n### **(OPTIONAL)** Building llama.cpp from source\n1. Clone llama.cpp's GitHub repo\n```sh\ngit clone https://github.com/ggerganov/llama.cpp\ncd llama.cpp\n```\n\n2. Build llama.cpp\nOn Windows:\n```cmd\nmkdir build\ncd build\ncmake ..\ncmake . --config Release\n```\n\nOn Linux and MacOS:\n```sh\nmake\n```\n\n### Running the project from source\n1. Clone the GitHub repo\n```sh\ngit clone https://github.com/ItsPi3141/alpaca-electron\ncd alpaca-electron\n```\n\n2. Install node packages\n```sh\nnpm install\nnpm run rebuild\n```\n\u003e **Info**\nIf you are on Linux, replace `npm run rebuild` with `npm run rebuild-linux`\n\n3. **(OPTIONAL)** Use your own llama.cpp build\n\u003e **Warning**  \n\u003e This step is not required. Only do it if you had built llama.cpp yourself and you want to use that build. Otherwise, skip to **step 4**\nIf you had built llama.cpp in the previous section, copy the `main` executable file into the `bin` folder inside the alpaca-electron folder. \n\nMake sure the file replaces the correct file. E.g. if you're on Windows, replace chat.exe with your file. If you're on arm64 MacOS, replace chat_mac_arm64. Etc...\n\n4. Start the Electron app\n```sh\nnpm start\n```\n\n### Building a release and installer\nRun one of the following commands:\n- `npm run win`\n- `npm run mac-x64`\n- `npm run mac-arm64`\n- `npm run linux-x64`\n\nYou can only build for the OS you are running the build on. E.g. if you are on Windows, you can build for Windows, but not for MacOS and Linux. \n\n\n## 👨‍💻 Credits\n\nCredits go to [@antimatter15](https://github.com/antimatter15/alpaca.cpp) for creating alpaca.cpp and to [@ggerganov](https://github.com/ggerganov/llama.cpp) for creating llama.cpp, the backbones behind alpaca.cpp. Finally, credits go to Meta and Stanford for creating the LLaMA and Alpaca models, respectively.\n\nSpecial thanks to [@keldenl](https://github.com/keldenl) for providing arm64 builds for MacOS and [@W48B1T](https://github.com/W48B1T) for providing Linux builds\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FItsPi3141%2Falpaca-electron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FItsPi3141%2Falpaca-electron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FItsPi3141%2Falpaca-electron/lists"}