Heurist is a Layer 2 network based on the ZK Stack that focuses on AI model hosting and inference. It is positioned as the Web3 version of HuggingFace, providing users with serverless access to open-source AI models. These models are hosted on a decentralized computational resource network.
The vision of Heurist is to decentralize AI using blockchain technology, enabling widespread and fair innovation. Its goal is to ensure accessibility and unbiased innovation of AI technology through blockchain, promoting the integration and development of AI and cryptocurrencies.
The name Heurist is derived from heuristics, which refers to the process by which the human brain quickly reaches reasonable conclusions or solutions when solving complex problems. This name reflects Heurist’s vision of solving AI model hosting and inference problems quickly and efficiently through decentralized technology.
The Problem with Closed-Source AI
Closed-source AI typically follows US laws for review, but this may not align with the needs of other countries and cultures, leading to over- or under-censorship. This not only affects the performance of AI models but also may infringe on users’ freedom of expression.
The Rise of Open-Source AI
Open-source AI models often outperform closed-source models in many areas, such as Stable Diffusion models outperforming OpenAI’s DALL-E 2 in image generation and at a lower cost. The weights of open-source models are public, allowing developers and artists to fine-tune them according to specific needs.
The community-driven innovation of open-source AI is also a highlight. Open-source AI projects benefit from the collective contributions and reviews of diverse communities, promoting rapid innovation and improvement. Open-source AI models provide unprecedented transparency, allowing users to review training data and model weights, enhancing trust and security.
A detailed comparison between open-source AI and closed-source AI is shown in the following image:
Data Privacy
The Heurist project integrates the Lit Protocol to encrypt data during AI model inference, including the input and output of AI inference. For miners, Heurist has two major categories: public miners and privacy-enabled miners.
Public Miners: Anyone with a GPU that meets the minimum requirements can become a public miner, and the data processed by these miners is not encrypted.
Privacy-Enabled Miners: Trusted node operators can become privacy-enabled miners and process sensitive information such as confidential files, health records, and user identity data. These miners must comply with off-chain privacy policies. The data is encrypted during transmission, and the routers and sorters of the Heurist protocol cannot decrypt this data. Only miners that match the user’s access control conditions (ACC) can decrypt the data.
Building Trust for Privacy-Enabled Miners
Trust for privacy-enabled miners is primarily established through two methods:
Off-Chain Consensus: Off-chain consensus established through real-world laws or agreements, which is technically easy to implement.
Trusted Execution Environment (TEE): Utilizing TEE to ensure the security and confidential processing of sensitive data. Although there are currently no mature TEE solutions for large-scale AI models, the latest chips from companies like Nvidia demonstrate potential in supporting TEE for AI workloads.
Token Economics Model
The token of the Heurist project is called HUE, which is a utility token with a dynamic supply regulated through issuance and burning mechanisms. The maximum supply of HUE tokens is limited to 1 billion.
The token allocation and distribution mechanisms can be roughly divided into two categories: mining and staking.
Mining: Users can mine HUE tokens by hosting AI models on their GPUs. Mining nodes must stake at least 10,000 HUE or esHUE tokens to activate, and those below this threshold will not receive rewards. The rewards for mining are in esHUE tokens, which are automatically compounded into the staking of the mining nodes. The reward rate depends on GPU efficiency, availability (normal operating time), the type of AI model being run, and the total staked amount in the nodes.
Staking: Users can stake HUE or esHUE tokens in mining nodes. The staking rewards are paid in HUE or esHUE tokens, with higher rewards for staking esHUE tokens. Unlocking staked HUE tokens requires a 30-day lock-up period, while there is no lock-up period for unlocking staked esHUE tokens. esHUE rewards can be converted into HUE tokens through a one-year linear release period. Users can transfer their staked HUE or esHUE tokens from one mining node to another instantly, promoting flexibility and competition among miners.
Token Burning Mechanism
Similar to Ethereum’s EIP-1559 model, the Heurist project implements a token burning mechanism. When users pay for AI inference fees, a portion of the HUE tokens used for payment is permanently removed from circulation. The issuance and burning of tokens are closely related to network activity, and during periods of high usage, the burning rate of tokens may exceed the issuance rate, leading to a deflationary phase in the Heurist network. This mechanism helps regulate token supply and aligns the token value with the actual demand within the network.
Bribes Mechanism for Tokens
The bribes mechanism, originally proposed by users of Curve Finance, is a gamified incentive mechanism used to guide rewards for liquidity pools. Heurist project has adopted this mechanism and applied it to improve mining efficiency. Miners can choose to set a certain percentage of their mining rewards as bribes to attract stakers. Stakers may choose to provide their stakes to miners offering the highest bribes but also consider factors such as the miner’s hardware performance and normal operating time. Miners are incentivized to provide bribes because higher staking leads to higher mining efficiency, creating an environment of competition and collaboration, where miners and stakers work together to provide better services for the network.
Through these mechanisms, the Heurist project aims to create a dynamic and efficient token economy to support its decentralized AI model hosting and inference network.
Incentivized Testnet
During the incentivized testnet phase, the Heurist project allocates 5% of the total supply of HUE tokens for mining rewards. These rewards are calculated in the form of points, which can be converted into fully liquid HUE tokens after the mainnet token generation event (TGE). Testnet rewards are divided into two categories: one for Stable Diffusion models and another for Large Language Models (LLMs).
Points Mechanism
Llama Point: Used for LLM miners, one Llama Point is earned for processing 1000 input/output tokens by the Mixtral 8-7b model. The calculation is shown in the image below:
Waifu Point: Used for Stable Diffusion miners, one Waifu Point is earned for generating a 512×512 pixel image (using the Stable Diffusion 1.5 model with 20 steps of iteration). The calculation is shown in the image below:
After each computation task is completed, the system evaluates the complexity of the task based on GPU performance benchmark results and assigns corresponding points. The allocation ratio of Llama Points and Waifu Points will be determined close to the TGE, taking into account the demand and usage of both model categories in the coming months.
Participating in the testnet can be done in two ways:
Bring Your Own GPU: Whether you are a high-end gaming enthusiast, a former Ethereum miner with idle GPUs, an AI researcher with occasionally idle GPUs, or a data center owner with spare capacity, you can download the mining software and set up a mining node. Detailed hardware specifications and setup guides can be found on the mining guide page.
Renting Hosted Nodes: For those without the required GPU hardware, Heurist offers hosted mining node services at competitive prices. A professional engineering team will be responsible for setting up the mining hardware and software, and you can simply observe your daily growing rewards.
Please note that the Heurist testnet has anti-cheating measures in place, with inputs and outputs of each computation task being stored and tracked by an asynchronous monitoring system. If miners engage in malicious behavior to manipulate the reward system (such as submitting incorrect or low-quality results, tampering with downloaded model files, tampering with device and latency metric data), the Heurist team has the right to reduce their testnet points.
Heurist Mining
The Heurist testnet offers two types of points: Waifu Point and Llama Point. Waifu Points are obtained by running the Stable Diffusion model to generate images, while Llama Points are obtained by running Large Language Models (LLMs). There are no restrictions on GPU models when running these models, but there are strict requirements for GPU memory. Models with higher GPU memory requirements will have higher point coefficients.
The currently supported LLM models are listed in the image below. For Stable Diffusion models, there are two modes: SDXL enabled and SDXL excluded. Enabling SDXL mode requires 12GB of GPU memory, while I found in my testing that excluding SDXL mode only requires 8GB of GPU memory.
Applications
The Heurist project showcases its powerful AI capabilities and broad application prospects through three application directions: image generation, chatbots, and AI search engines. In terms of image generation, Heurist utilizes the Stable Diffusion model to provide efficient and flexible image generation services. In terms of chatbots, intelligent conversations and content generation are achieved through large language models. In terms of AI search engines, precise information retrieval and detailed answers are provided through the integration of pre-trained language models.
These applications not only enhance user experience but also demonstrate Heurist’s innovation and technical advantages in the decentralized AI field. The application effects are shown in the image below:
Image Generation
The image generation application of the Heurist project mainly relies on the Stable Diffusion model to generate high-quality images based on textual prompts. Users can interact with the Stable Diffusion model through the REST API, submitting text descriptions to generate images. The cost of each generation task depends on the resolution of the image and the number of iterations. For example, generating a 1024×1024 pixel image with 40 iterations using the SD 1.5 model requires 8 Standard Credit Units. Through this mechanism, Heurist provides efficient and flexible image generation services.
Chatbots
The chatbot application of the Heurist project enables intelligent conversations through large language models (LLMs). Heurist Gateway is an LLM API endpoint compatible with OpenAI, built using LiteLLM, allowing developers to call the Heurist API in OpenAI format. For example, using the Mistral 8x7b model, developers can replace existing LLM providers with a few lines of code and achieve similar performance to ChatGPT 3.5 or Claude 2 at a lower cost.
Heurist’s LLM models support various applications, including automated customer service, content generation, and complex question answering. Users can interact with these models by submitting text inputs through the API and receiving responses generated by the models, enabling diverse conversations and interactions.
AI Search Engine
The AI search engine of the Heurist project provides powerful search and information retrieval capabilities by integrating large-scale pre-trained language models such as Mistral 8x7b. Users can obtain accurate and detailed answers through simple natural language queries. For example, when asking “Who is the CEO of Binance?”, the Heurist search engine not only provides the name of the current CEO (Richard Teng) but also provides detailed explanations about his background and the previous CEO.
The Heurist search engine combines text generation and information retrieval technologies to handle complex queries and provide high-quality search results and related information. Users can submit queries through the API and receive structured answers and references, making Heurist’s search engine suitable for both general users and meeting the needs of professional fields.
In summary, Heurist is a decentralized AI project that aims to revolutionize AI model hosting and inference. Through its innovative technology and token economy, Heurist has the potential to create a transparent, efficient, and user-centric AI ecosystem. With its various applications, Heurist demonstrates the power of decentralized AI and its wide range of possibilities.