AI Models: Repository, Standardization, Uniformity

On the AI model side, we define AI Kernel (AIK). The kernel encapsulates all of the necessary building blocks for a node to download and correctly execute an AI model. The AI kernel is stored on the blockchain to facilitate transparency and repeatability, providing an immutable and verifiable record of the model’s execution environment and logic.

Repository

Nesa provides a robust platform designed to support various AI models, catering to various computational needs and inference tasks. Our on-chain repository not only offers access to these models but also encourages active contributions from the community to expand the available tools.

Among the models we support are advanced vision-language models like LLaMA 2 and LLaMA 3, which excel in integrating visual content with natural language processing. Additionally, generative models such as Stable Diffusion are included, allowing for creative image synthesis based on textual descriptions. This inclusive approach ensures that users can leverage the right tools for tasks ranging from simple classifications to complex multimodal challenges.

More detailed information about the full range of models supported by Nesa will be available on our platform as our repository continues to grow.


Standardized Specifications

To achieve uniform model execution, the configuration must encompass every aspect that could influence the computational outcome. This includes specifying the operating system and compiler versions, along with precise compilation options and flags.

By rigorously defining the execution environment, we eliminate variability that could otherwise arise from different software stacks.

Hardware Specifications

If a model demands particular hardware characteristics, such as GPU acceleration or specialized processing units like TPUs, its configurations explicitly state these requirements.

Moreover, features provided by the hardware that could potentially lead to inconsistent execution, such as non-deterministic hardware instructions, are either strictly enabled or disabled as appropriate.

This approach ensures that all participating nodes adequately prepare and align their computational capabilities with the model’s needs.

Software and Algorithm Specifications

Many AI models introduce randomness during inference, which can challenge achieving deterministic and reproducible results. To mitigate this, we have implemented the strategy of fixing the random seed, which ensures that any pseudo-random number generation during inference leads to the same sequence of numbers across all executions.

In scenarios where public randomness is necessary, we integrate the cryptographic method of Verifiable Random Functions (VRFs) that produce randomness that is both unpredictable and provably unbiased.

This use of VRF in our system not only lends credibility to the random number generation process but also makes it possible to verify the randomness after the fact.

To summarize, each AI model in the Nesa ecosystem comprises four integral components:

  • Model Parameters are the weights and biases that define the AI model. They are the product of the training process and dictate the model’s behavior and capabilities.

  • Configuration File functions similar to a Docker file, which contains the above specifications for the virtual environment in which the AI model will execute. It details the dependencies, libraries, and runtime needed to run the model, ensuring that every node sets up an execution environment with identical configurations.

  • Inference Code is the code that runs the AI model. This includes the logic for processing inputs and generating predictions or outputs. The inference code also comes with necessary compilation information to ensure it can be seamlessly executed.

  • Aggregation Code is a piece of scripting code that determines how the decentralized participants will aggregate and reach consensus from results returned from different nodes.


Uniformity

The execution protocol within Nesa prescribes a series of steps that every node must follow. This protocol includes initialization procedures, data input conventions, model execution, and output handling. By standardizing the execution flow, we can reliably predict and replicate the behavior of AI models across the network.

Before an AI model is approved and stored on the blockchain, it undergoes rigorous validation to ensure compliance with the specified configuration and to confirm that it yields consistent results across diverse environments. A suite of tests is run in simulated multi-node scenarios to affirm that the kernel’s execution is deterministic and immune to variances in the underlying systems. The measures create a robust framework for model consistency and inference reliability within the Nesa system.

These provisions are critical for maintaining the integrity of our decentralized inference system, guaranteeing that any node, regardless of its individual hardware or software configurations, can reliably participate in the network and contribute to collective AI tasks.

This standard of uniformity enables a diverse ecosystem of nodes to work together seamlessly and trustlessly.

Last updated