GithubHelp home page GithubHelp logo

intelligencedev / eternal Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 0.0 69.95 MB

Eternal is an experimental platform for machine learning models and workflows.

Home Page: https://intelligence.dev

License: Other

Go 70.88% CSS 3.15% JavaScript 3.86% HTML 19.67% Makefile 1.18% Python 1.26%
ai go htmx inference-api llamacpp ml stable-diffusion

eternal's Introduction

logo

Eternal

Eternal is an experimental platform for machine learning workflows.

logo
logo

NOTE: This app is a work in progress and not stable. Please consider this repo for your reference. We welcome contributors and constructive feedback. You are also welcome to use it as reference for your own projects.

Eternal integrates various projects such as llama.cpp, stable diffusion.cpp and codapi among many other projects whose developers were kind enough to share with the world. All credit belongs to the respective contributors of all dependencies this repo relies on. Thank you for sharing your projects with the world.

The Eternal frontend is rendered with the legendary HTMX framework.

IMPORTANT:

Configure the quant level of the models in your config.yml appropriately for your system specs. If a local fails to run, investigate the reason by viewing the generated main.log file. The most common reason is insufficient RAM or incorrect prompt template. We will implement more robust error handling and logging in a future commit.

Features

  • Language model catalog for easy download and configuration.
  • Text generation using local language models, OpenAI GPT-4 an Google Gemini 1.5 Pro.
  • Web retrieval that fetches URL content for LLM to reference.
  • Web Search to automatically retrieve top results for a user's prompt for LLM to reference. Requires Chrome browser installation.
  • Image generation using Stable Diffusion backend.

Getting Started

Basic documentation is provided in the docs folder in this repository.

Showcase

Web Retrieval - Search

Web tools can be enabled via the config.yml file.

  • webget: Attempts to fetch a URL passed in as part of the prompt.
  • websearch: Searches the public web for pages related to your prompt.

Requires Chrome browser installation.

logo

Code Execution

Execute and edit LLM generated code in the chat view in a secure sandbox. For now, JavaScript is implemented via WASM. More languages coming soon!

logo

Image Generation

Embedded Stable Diffusion for easy high quality image generation.

logo logo

Configuration

Rename the provided .config.yml file to config.yml and place it in the same path as the application binary. Modify the contents for your environment and use case.

Build

Eternal currently supports building on Linux or Windows WSL using CUDA (nVidia GPU required) or MacOS/Metal (M-series Max required).

To build the application:

$ git clone https://github.com/intelligencedev/eternal.git
$ cd eternal
$ git submodule update --init --recursive
$ make all

Please submit an issue if you encounter any issues with the build process.

Disclaimer

This README is a high-level overview of the Eternal application. Detailed setup instructions and a complete list of features, dependencies, and configurations should be consulted in the actual application documentation.

eternal's People

Contributors

art9681 avatar dustymongoose avatar

Stargazers

maertayn avatar Kraionix avatar  avatar Tony Rodriguez avatar jacobi petrucciani avatar  avatar  avatar Markus Rauhalahti avatar  avatar  avatar  avatar Mathieu Simoph avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eternal's Issues

Validate external app dependencies and bootstrap them if not present.

Eternal will require third party application installations for the various tools that will not be embedded. Currently, the web tool requires a headless Chrome install. Chromium would be ideal but it has not been tested yet. We need a method to detect if this app is installed in the end user's OS, and if not, install it.

The Go ChromeDP package may have methods to do this. Otherwise we will implement our own.

If its possible to do this via the package, then the implementation should go in the web tool:

https://github.com/intelligencedev/eternal/blob/main/pkg/web/web.go

Otherwise, a generic method in the main app will suffice to run the process for any third party dependency.

Add image generation tool.

Implement the image generation feature. The obvious choice is Stable Diffusion but there is more competition in that space. We will start with Stable Diffusion, but also investigate how we could potentially add support for other image gen models and backends.

Investigate methods for secure code execution. Bonus points if we can run it from the code blocks in the frontend.

We need to implement a code runner solution that is sandboxed in a secure environment. Most applications in this space use a container for this purpose but there may be other options. We should explore an option that does not require a third party OS install such as WASM, but that may not be ideal. Some options to research:

  • WASM
  • MicroVM
  • Container
  • A secure sandbox like Firejail or similar alternatives that works across Linux, Mac and Windows. This is unlikely, but just leaving here for reference.

We also want to be able to execute code generated by the LLM via the frontend by triggering an event using a play button that gets injected into code blocks. That may need to be a separate issue but let's leave the idea here for now.

Enhance the code block elements - Close the block as its generated and add a copy button.

The current implementation does not correctly format large code blocks as they are being generated due to the closing tag not being generated by LLM. We need a method to close the blocks as the code is being generated so they display properly from the start.

We also need a copy button on the top right of the block so the end user can easily copy the code.

The copy button will need to be implemented in the chat template:

https://github.com/intelligencedev/eternal/blob/main/public/templates/chat.html

Configure the CI pipeline for Metal, CUDA, and ROCm.

Eternal currently requires some manual tweaking to build properly due to the lack of proper automation for the build process. This issue serves as a generic reminder that we need to put this on autopilot and have a CI pipeline built to automatically build and publish new releases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.