Dec. 14th 2024
Summary
DFINITY’s Internet Computer Protocol is advancing decentralised AI with milestones like Cyclotron, optimising AI computations, SIMD technology, and tools like Sonos Tract. With future GPU acceleration and Wasm64 capabilities, ICP is shaping a scalable, innovative blockchain-AI ecosystem.
On December 16th, DFINITY will host a live event about a decentralized AI manifesto (DeAI). My latest video or the manifesto page provides information about all the organizations involved in embracing this manifesto and its basic guidelines.
Today’s article analyses DFINITY’s progress on its roadmap for decentralized AI.
A significant milestone was the completion of Cyclotron on July 15, 2024.
What it is and what they achieved
AI computations require a significant amount of calculations, particularly with floating-point numbers (numbers with decimals). These computations need to be fast, predictable, and consistent across all nodes in a blockchain network.
To manage this, the blockchain’s virtual machine (the part that executes smart contracts) must efficiently perform these complex calculations. ICP utilizes WebAssembly (Wasm) as its virtual machine, which is better suited for AI tasks compared to Ethereum Virtual Machine (EVM) because it supports operations like floating-point arithmetic and operates at near-native speed.
The Cyclotron milestone aims to enhance ICP’s virtual machine for faster and more efficient AI computations, with a focus on various areas:
Deterministic Floating-Point Operations: Blockchain nodes must execute the same code and agree on the results to achieve consensus. If floating-point operations are not deterministic (they produce different results each time), nodes may disagree, which can disrupt the blockchain. DFINITY engineers have optimized floating-point operations within WebAssembly to make them both faster and deterministic. This ensures that all nodes reach the same result when performing these calculations, which is critical for the stability of the blockchain and for AI applications that rely on consistent, precise computations.
SIMD (Single Instruction, Multiple Data) Technology: SIMD is a feature in modern CPUs that allows them to perform many calculations simultaneously. For example: Instead of adding two numbers, it can add four numbers at once and It can process 16 smaller numbers (8-bit integers) in parallel for simpler calculations. By enabling WebAssembly to utilize SIMD, ICP’s virtual machine can conduct multiple AI calculations in parallel, enhancing the speed of smart contracts by a factor of 4 to 16, depending on the task.
SIMD Support in AI Tools: Cyclotron added WebAssembly SIMD support to AI libraries. DFINITY implemented this in the open-source Sonos Tract inference engine, optimizing matrix multiplication and numerical algorithms through SIMD instructions. This improvement enhances the performance of the Internet Computer Protocol and benefits the broader developer community.
An article on Medium provides an overview of four significant achievements made possible through the use of cyclotron:
1) Image Classification: This utilizes a MobileNet model to classify input images. The number of WebAssembly instructions required for a single inference has been reduced from 24.7 billion to 3.7 billion.
2) Face Detection: The Ultraface model identifies the bounding box around a face within the input image. The Wasm instructions needed for one inference decreased from 6.1 billion to 1.2 billion.
3) Face Recognition: This model generates vector embeddings of the input image of a face. The number of Wasm instructions for a single inference dropped from 77 billion to 9 billion.
4) GPT-2: This model has been adapted into a smart contract by DecideAI.
Future features:
At DFINITY they are currently working on the Ignition milestone.
The aim is to enable the Internet Computer to run larger AI programs directly on its blockchain. This includes tasks such as training AI models and making predictions (inference). To achieve this, canisters need to be capable of handling more complex and resource-intensive tasks than before.
Key Features Being Developed
API for AI Computations (In Progress): The API will enable smart contracts to utilize hardware acceleration, which speeds up computations by using the CPU and, in the future, GPUs which is much more effective for running AI programs.
Wasm64 Execution Environment (In Progress): Larger AI models, such as GPT, require substantial memory. With Wasm64, developers can load these bigger models into the system, enabling the development of more powerful AI applications.
Tooling and Libraries for AI Smart Contracts: These comprise pre-built tools and reusable codes that facilitate the development process. The aim is to provide developers with resources to create AI programs on ICP without starting from scratch.
With these updates, ICP will be capable of running sophisticated AI systems directly on its decentralized network. This connects to the soon-to-be-launched Caffeine.ai project.
Caffeine.ai: A Bold New Step
Caffeine.ai, built on the Internet Computer Protocol, has the potential to reshape how we interact with decentralized technologies. It allows users to create applications simply by describing their needs, with the AI generating entire codebases directly on the ICP blockchain. While the concept is ambitious, it’s too early to say how feasible or impactful it will be. We’ll need to wait and see.
Dominic has already presented a demo of Caffeine.ai to major players in the AI space. You can check out what Kyle Langham mentioned in the short video.
Conclusion
DFINITY is leading the way in decentralized AI with groundbreaking achievements like Cyclotron and innovative projects like Caffeine.ai. Their work is pushing blockchain and AI to new heights, and while some ideas are still in their early stages, the future looks promising. We’re excited to see how these advancements will unfold in the real world.