Updated: August 14, 2023

Harnessing Lightning Network for AI Innovation – Pt 1

Ready to Get Started

Get started building with the Lightning Network Today.

Contents

Key Takeaways

Inspired by Hivemind’s thesis on “How (Actually) Open AI Wins,” this series will explore how AI companies and projects can harness the power of the Lightning Network to push innovation and what tools builders can use to build this future.

AI Models

An AI model is a computer program capable of identifying patterns or making determinations from datasets it has never encountered before. For instance, within natural language processing, these models can analyze and accurately discern the purpose behind novel sentences or combinations of words. In the context of image recognition, such a model can learn to identify various objects, like cats or dogs.

Foundational Training

To build such models, the first step is building a foundational model. A foundation model, or base model, is a large AI model trained on extensive data at scale. This training aims to create a versatile model tailored to a broad spectrum of subsequent tasks later. Early examples of foundation models were pre-trained large language models (LLMs) including Google’s BERT[5] and various early GPT foundation models.

Foundational training AI models is an incredibly expensive task. In a recent interview, Sam Altman from Open AI stated that the cost of training GPT-4 was more than 100 million dollars. This puts the power of developing these incredible tools in the hands of a few companies and individuals. Fortunately, an alternative exists: multiple companies could collaborate, splitting the training and costs. This is known as distributed computing.

Cooperative Foundational Training and the Lightning Network

But suppose organizations want to split the task and costs of foundational training an AI. In that case, a new problem arises: How can these companies cheaply and fastly settle their debts with one another to offset computing costs?

This is where the Lightning Network fits perfectly. Let’s go through the benefits of the Lightning Network for this:

Scalability and Speed

LN can handle millions of transactions per second at a near-instantaneous speed. This allows organizations to make continuous payments in real-time as training costs are incurred. They could pay their debts among each other by the second, or maybe even less.

Micropayments

The protocol is specially designed to support micropayments, which can be very useful when the cost of training is divided among many participants. This allows organizations to make small, granular payments that closely match the actual costs they are incurring. This can all be done by the second.

Zero Fee Payments

Lightning Network’s fees are already low, but organizations can make it even more economical. They can establish direct payment channels among themselves. In this setup, payments bypass routing, going straight from the payer to the receiver and eliminating fees. This starkly contrasts traditional, often costly, cross-border transactions or those involving different currencies.

Financial Inclusivity

Organizations worldwide, including developing regions, can participate in this collaborative effort by using a decentralized and borderless payment network. This democratizes access to AI foundational training, fostering innovation and promoting a more equitable distribution of resources.

Reduced Complexity

The Lightning Network simplifies the payment process, eliminating the need for cumbersome financial intermediaries. Organizations can transfer funds directly between each other without the need for a third party. This direct transfer of funds eliminates custodial risks and cuts costs associated with third-party money services.

Payment Rails

Organizations are not bound to use Bitcoin as the standard of value transfer. They can use the network as a transaction conduit if they find their local currency more convenient or efficient. This way, companies can transact in their familiar local currency while reaping the benefits of the Lightning Network’s robust infrastructure.

Fine Tuning and Lightning

After foundational training, the next step is to fine-tune the AI. Fine-tuning is a process in AI, particularly in machine learning, where a pre-trained model (like a foundation model) is further trained on a specific task, typically with a smaller dataset related to that task. This is also known as transfer learning, as knowledge from the initial training is transferred to help the model with a new task.

The concept behind fine-tuning is that while the base model has learned a lot of general features about the data in the foundational training phase, it might not be perfect for a specific task. For instance, an AI model trained to understand language might be pretty good at understanding English but struggle with medical terminology or slang. To make the model better at understanding these specific types of language, one could fine-tune it on a smaller dataset of medical articles or text messages, respectively.

One of the techniques used for fine tunning artificial intelligence is called Reinforcement Learning from Human Feedback (RLHF). This is a fine-tuning strategy that employs both reinforcement learning and human interaction to refine an AI model. In this process, human evaluators review and rate the outputs generated by the AI model. Based on these ratings, a reward model is created. The AI then uses this reward model to learn and improve.

All you need to receive Lightning payments is a mobile phone and internet access. According to research, approximately 4.32 billion active internet users access the internet using mobile phones. Companies could outsource fine-tuning and pay with Bitcoin.

Exploding Topics

Some of the benefits discussed in the previous sections also apply to this one. The permissionless nature of Lightning means that anyone around the globe with access to the internet can participate and that companies don’t need to deal with the hassles of cross-border fiat payments.

Micro and instant payments mean that people can get paid per task instead of having them complete a big batch of tasks before paying. The low-fee nature of the Lightning Network also enables companies to lower the costs of sending money across the globe.

In the early days of Bitcoin, people were rewarded with Bitcoin for solving captcha. Shortly, people can get paid in Bitcoin via the Lightning Network to help fine-tune AIs that will solve captchas.

Serving AIs and Getting paid With Bitcoin

Once AI models are ready, they’re served through software installed in data centers. These programs process user prompts, perform necessary computations, and return results. Today’s leading company in this market averages all users’ computing costs and charges everyone the same rate. This means that light users performing simple tasks subsidize the costs of heavy users. A more equitable solution could be a pay-per-use model.

Additionally, individuals are starting to run self-served AI on their home hardware, particularly those with high-end GPUs. This trend could evolve further. Imagine if these users could earn income by allowing others to use their hardware for AI computations.

Lightning is also the perfect tool for this job. For both cases of pay-per-use or outsourcing home hardware, companies and people could charge by use using Lightning Invoices. This makes this use case ready for the market to the entire world by day one. No need to support multiple fiat currencies. No need to pay banks to intermediate payers and receivers. Just use Lightning.

Concluding

In conclusion, the Lightning Network emerges as an integral catalyst in advancing AI innovation, democratizing access, and solving the costly and complex issues traditionally associated with AI training and deployment. Its unique features like scalability, support for micropayments, low-to-zero fee payments, and financial inclusivity make it a robust solution for organizations worldwide. It allows them to cooperatively train AI models, settle costs in real-time, and ensure equitable sharing of resources. The direct transfer functionality further simplifies transactions by cutting out intermediaries and reducing complexity.

Beyond foundational training, the Lightning Network also facilitates fine-tuning of AI models. It allows individuals globally to participate in this process, paving the way for task-based micro-payments and real-time remuneration. This model could revolutionize the future of AI fine-tuning, providing new income opportunities to billions of internet users worldwide.

The advent of serving AI models and the potential of harnessing home-based hardware for AI computations could be game-changers. The possibility of a pay-per-use model powered by the Lightning Network brings forth more equitable solutions and new revenue streams.

Applying the Lightning Network in AI development provides an accessible, inclusive, and efficient way to push AI innovation further. As this series continues, we look forward to examining more deeply how these advantages can be harnessed by AI developers and how Lightning Network’s innovative solutions could reshape the AI landscape for the better.


If you are building AI solutions and want to leverage Lighting Network you can get started on Voltage by spinning up your lightning node and getting channel liquidity instantly.

Subscribe To Our Newsletter