Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/llm-edge/hal-9100
Edge full-stack LLM platform. Written in Rust
https://github.com/llm-edge/hal-9100
ai deep-learning edge large-language-models llm machine-learning
Last synced: 3 months ago
JSON representation
Edge full-stack LLM platform. Written in Rust
- Host: GitHub
- URL: https://github.com/llm-edge/hal-9100
- Owner: llm-edge
- License: mit
- Created: 2023-11-15T13:50:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-05-25T09:42:43.000Z (6 months ago)
- Last Synced: 2024-06-06T09:35:20.330Z (5 months ago)
- Topics: ai, deep-learning, edge, large-language-models, llm, machine-learning
- Language: Rust
- Homepage:
- Size: 1.58 MB
- Stars: 357
- Watchers: 11
- Forks: 28
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- project-awesome - llm-edge/hal-9100 - Edge full-stack LLM platform. Written in Rust (Rust)
README
⚠️ README outdated ([undergoing large refactor](https://github.com/llm-edge/hal-9100/tree/0.1)) ⚠️
🤖 HAL-9100
Build AI Assistants that don't need internet. Using OpenAI SDK. For production.
100% Private, 75% Cheaper & 23x Faster Assistants.
-----
🖼️ Infra
✨ Feature?
❤️🩹 Bug?
📞 Help?-----
# ✨ Key Features
- [x] **Code Interpreter**: Generate and runs Python code in a sandboxed environment autonomously. (beta)
- [x] **Knowledge Retrieval**: Retrieves external knowledge or documents autonomously.
- [x] **Function Calling**: Defines and executes custom functions autonomously.
- [x] **Actions**: Execute requests to external APIs autonomously.
- [x] **Files**: Supports a range of file formats.
- [x] **OpenAI compatible**: Works with OpenAI (Assistants) SDK# 😃 Who is it for?
- You want to increase customization (e.g. use your own models, extend the API, etc.)
- You work in a data-sensitive environment (healthcare, IoT, military, law, etc.)
- Your product does have poor or no internet access (military, IoT, edge, extreme environment, etc.)
- (not our main focus) You operate on a large scale and want to reduce your costs
- (not our main focus) You operate on a large scale and want to increase your speed# 🤖 Our definition of Software 3.0
First, our definition of **Software 3.0**, as it is a loaded term:
Software 3.0 is the bridge connecting the cognitive capabilities of Large Language Models with the practical needs of human digital activity. It is a comprehensive approach that allows LLMs to:
1. perform the same activity (or better) on the digital world than humans
2. generally, allow the user to [perform more operations without conscious effort](https://third.software/)# 📏 Principles
HAL-9100 is in continuous development, with the aim of always offering better infrastructure for **Edge Software 3.0**. To achieve this, it is based on several principles that define its functionality and scope.
Less prompt is more
As few prompts as possible should be hard-coded into the infrastructure, just enough to bridge the gap between **Software 1.0** and **Software 3.0** and give the client as much control as possible on the prompts.
Edge-first
HAL-9100 does not require internet access by focusing on **open source LLMs**. Which means you own your data and your models. It runs on a Raspberry PI (LLM included).
OpenAI-compatible
OpenAI spent a large amount of the best brain power to design this API, which makes it an incredible experience for developers. Support for OpenAI LLMs are not a priority at all though.
Reliable and deterministic
HAL-9100 focus on reliability and being as deterministic as possible by default. That's why everything has to be tested and benchmarked.
Flexible
A minimal number of hard-coded prompts and behaviors, a wide range of models, infrastructure components and deployment options and it play well with the open-source ecosystem, while only integrating projects that have stood the test of time.
# Quickstart
Get started in less than a minute through GitHub Codespaces:
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/llm-edge/hal-9100?quickstart=1)
Or:
```bash
git clone https://github.com/llm-edge/hal-9100
cd hal-9100
```To get started quickly, let's use Anyscale API.
Get an API key from Anyscale. You can get it [here](https://app.endpoints.anyscale.com/credentials). Replace in [hal-9100.toml](./hal-9100.toml) the `model_api_key` with your API key.Usage w/ ollama
1. use `model_url = "http://localhost:11434/v1/chat/completions"`
2. set `gemma:2b` in [examples/quickstart.js](./examples/quickstart.js)
3. and run `ollama run gemma:2b & && docker compose --profile api -f docker/docker-compose.yml up`Install OpenAI SDK: `npm i openai`
Start the infra:
```bash
docker compose --profile api -f docker/docker-compose.yml up
```Run the [quickstart](./examples/quickstart.js):
```bash
node examples/quickstart.js
```# 🤔 FAQ
Is there a hosted version?
No. HAL-9100 is not a hosted service. It's a software that you can deploy on your infrastructure. We can help you deploy it on your infrastructure. [Contact us](https://cal.com/louis030195/applied-ai).
Which LLM API can I use?
Examples of LLM APIs that does support OpenAI API-like, that you can use:
- ollama
- [MLC-LLM](https://github.com/mlc-ai/mlc-llm)
- [FastChat (good if you have a mac)](https://github.com/llm-edge/hal-9100/tree/main/examples/hello-world-mistral-curl)
- [vLLM (good if you have a modern gpu)](https://docs.vllm.ai/en/latest/getting_started/quickstart.html#openai-compatible-server)
- [Perplexity API](https://github.com/llm-edge/hal-9100/tree/main/examples/hello-world-code-interpreter-mixtral-nodejs)
- Mistral API
- anyscale
- together aiWe recommend these models:
- mistralai/Mixtral-8x7B-Instruct-v0.1
- mistralai/mistral-7bOther models have not been extensively tested and may not work as expected, but you can try them.
What's the difference with LangChain?
1. LangChain spans proprietary LLM and open source, among the thousands of things it spans. HAL-9100 laser focuses on Software 3.0 for the edge.2. You can write AI products in 50 lines of code instead of 5000 and having to learn a whole new abstraction
Are you related to OpenAI?
No.I don't use Assistants API. Can I use this?
We recommend switching to the Assistants API for a more streamlined experience, allowing you to focus more on your product than on infrastructure.Does the Assistants API support audio and images?
Images soon, working on it.