{"id":14964809,"url":"https://github.com/nuance1979/llama-server","last_synced_at":"2025-05-12T14:49:43.241Z","repository":{"id":150990278,"uuid":"622747592","full_name":"nuance1979/llama-server","owner":"nuance1979","description":"LLaMA Server combines the power of LLaMA C++ with the beauty of Chatbot UI.","archived":false,"fork":false,"pushed_at":"2023-06-10T01:23:19.000Z","size":26,"stargazers_count":123,"open_issues_count":6,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-11T00:02:14.485Z","etag":null,"topics":["chatbot-ui","llama","llama-cpp","llamacpp"],"latest_commit_sha":null,"homepage":"","language":"Python","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/nuance1979.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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-04-03T01:25:43.000Z","updated_at":"2025-05-06T21:15:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ff22478-3074-4933-b0a3-5e93a322b0ce","html_url":"https://github.com/nuance1979/llama-server","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.1875,"last_synced_commit":"1191e4003a01800b9c1f1e1dceac96a84fd5e008"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuance1979%2Fllama-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuance1979%2Fllama-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuance1979%2Fllama-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuance1979%2Fllama-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuance1979","download_url":"https://codeload.github.com/nuance1979/llama-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253646251,"owners_count":21941432,"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":["chatbot-ui","llama","llama-cpp","llamacpp"],"created_at":"2024-09-24T13:33:48.975Z","updated_at":"2025-05-12T14:49:43.186Z","avatar_url":"https://github.com/nuance1979.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLaMA Server\n\n[![PyPI version](https://img.shields.io/pypi/v/llama-server)](https://pypi.org/project/llama-server/) [![Unit test](https://github.com/nuance1979/llama-server/actions/workflows/test.yml/badge.svg?branch=main\u0026\u0026event=push)](https://github.com/nuance1979/llama-server/actions) [![GitHub stars](https://img.shields.io/github/stars/nuance1979/llama-server)](https://star-history.com/#nuance1979/llama-server\u0026Date) [![GitHub license](https://img.shields.io/github/license/nuance1979/llama-server)](https://github.com/nuance1979/llama-server/blob/master/LICENSE)\n\nLLaMA Server combines the power of [LLaMA C++](https://github.com/ggerganov/llama.cpp) (via [PyLLaMACpp](https://github.com/abdeladim-s/pyllamacpp)) with the beauty of [Chatbot UI](https://github.com/mckaywrigley/chatbot-ui).\n\n🦙LLaMA C++ (via 🐍PyLLaMACpp) ➕ 🤖Chatbot UI ➕ 🔗LLaMA Server 🟰 😊\n\n**UPDATE**: Greatly simplified implementation thanks to the [awesome Pythonic APIs](https://github.com/abdeladim-s/pyllamacpp#different-persona) of PyLLaMACpp 2.0.0!\n\n**UPDATE**: Now supports better streaming through [PyLLaMACpp](https://github.com/abdeladim-s/pyllamacpp)!\n\n**UPDATE**: Now supports streaming!\n\n## Demo\n- Better Streaming\n\nhttps://user-images.githubusercontent.com/10931178/231539194-052f7c5f-c7a3-42b7-9f8b-142422e42a67.mov\n\n- Streaming\n\nhttps://user-images.githubusercontent.com/10931178/229980159-61546fa6-2985-4cdc-8230-5dcb6a69c559.mov\n\n- Non-streaming\n\nhttps://user-images.githubusercontent.com/10931178/229408428-5b6ef72d-28d0-427f-ae83-e23972e2dcff.mov\n\n\n## Setup\n\n- Get your favorite LLaMA models by\n  - Download from [🤗Hugging Face](https://huggingface.co/models?sort=downloads\u0026search=ggml);\n  - Or follow instructions at [LLaMA C++](https://github.com/ggerganov/llama.cpp);\n  - Make sure models are converted and quantized;\n\n- Create a `models.yml` file to provide your `model_home` directory and add your favorite [South American camelids](https://en.wikipedia.org/wiki/Lama_(genus)), e.g.:\n```yaml\nmodel_home: /path/to/your/models\nmodels:\n  llama-7b:\n    name: LLAMA-7B\n    path: 7B/ggml-model-q4_0.bin  # relative to `model_home` or an absolute path\n```\nSee [models.yml](https://github.com/nuance1979/llama-server/blob/main/models.yml) for an example.\n\n- Set up python environment:\n```bash\nconda create -n llama python=3.9\nconda activate llama\n```\n\n- Install LLaMA Server:\n  - From PyPI:\n  ```bash\n  python -m pip install llama-server\n  ```\n  - Or from source:\n  ```bash\n  python -m pip install git+https://github.com/nuance1979/llama-server.git\n  ```\n\n- Start LLaMA Server with your `models.yml` file:\n```bash\nllama-server --models-yml models.yml --model-id llama-7b\n```\n\n- Check out [my fork](https://github.com/nuance1979/chatbot-ui) of Chatbot UI and start the app;\n```bash\ngit clone https://github.com/nuance1979/chatbot-ui\ncd chatbot-ui\ngit checkout llama\nnpm i\nnpm run dev\n```\n- Open the link http://localhost:3000 in your browser;\n  - Click \"OpenAI API Key\" at the bottom left corner and enter your [OpenAI API Key](https://platform.openai.com/account/api-keys);\n  - Or follow instructions at [Chatbot UI](https://github.com/mckaywrigley/chatbot-ui) to put your key into a `.env.local` file and restart;\n  ```bash\n  cp .env.local.example .env.local\n  \u003cedit .env.local to add your OPENAI_API_KEY\u003e\n  ```\n- Enjoy!\n\n## More\n\n- Try a larger model if you have it:\n```bash\nllama-server --models-yml models.yml --model-id llama-13b  # or any `model_id` defined in `models.yml`\n```\n\n- Try non-streaming mode by restarting Chatbot UI:\n```bash\nexport LLAMA_STREAM_MODE=0  # 1 to enable streaming\nnpm run dev\n```\n\n## Fun facts\n\nI am not fluent in JavaScript at all but I was able to make the changes in Chatbot UI by chatting with [ChatGPT](https://chat.openai.com); no more StackOverflow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuance1979%2Fllama-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuance1979%2Fllama-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuance1979%2Fllama-server/lists"}