How (Actually) Open AI Wins

The age of AI is finally here. Some are excited. Others terrified. Most are just watching in awe. As for me, I’m optimistic. I don’t rule out that bad outcomes are certainly possible, but I think that most fear results from a lack of imagination. I generally agree with the philosophies laid out in these excellent essays from Kevin Kelly and Marc Andreessen. I see far more ways that AI can usher in protopia than accidental extinction via paperclip optimization. What’s more, it seems to me that the single best safeguard for any theoretical or unknown risks from AI is nature itself – i.e. letting evolution run its course to grow competing/cooperating intelligences that will keep other AIs in check. There’s far more intelligence in nature than in the marvelous, but limited modeling capabilities of the mind (which is itself just one subset of nature). I am, however, much more concerned about the concrete risks of already powerful corporations and governments gaining monopolies over these new superpowers and using them to increase their control over human thought and action.

As I see it, humanity is at a turning point where we must either embrace a small handful of totalitarian super intelligences or move AI to the edge, allowing a wide diversity of machine intelligences to flourish in cooperation with an equally diverse set of human intelligences, forming a truly decentralized hivemind. Fortunately, there’s mounting evidence that open source models will be the ultimate winners. I’m bullish on companies like Replit, Hugging Face, LangChain, Mosaic ML,and Nomic making this world a reality. But the current generation of open source is not by itself enough. We need to solve at least three problems to build a truly capable swarm intelligence:

  1. How to train and serve federated, open models?
  2. How to improve the data quality of open models?
  3. How to equip AI agents to interact economically?

The three protocols I’ve been investing in at Hivemind Ventures over the last two years can provide the necessary infrastructure to solve these problems and link up billions of humans and trillions of machine intelligences together in a networked hivemind. They are:

  • Bitcoin as the neutral, decentralized protocol for money/value
  • ⚡️The Lightning Network as the neutral, decentralized protocol for payments
  • 𓅦 Nostr as the neutral, decentralized protocol for data and communications

For more background, check out my theses on Why Lightning and Why Nostr. Or if you prefer video, here’s a jam I made with my friend DK. The open ethos and principles behind Bitcoin, Lightning, and Nostr marry beautifully with the principles of Open Source AI development. Let’s explore how they work together:

1) Federated Model Training and Serving

There are three major steps in creating and deploying federated models: A) Foundation Training, B) Fine Tuning, and C) Serving.

A) Foundation Training

Training state of the art foundation models is incredibly expensive and thus the purview of only a few large companies (OpenAI and Google) and governments (the US and China). The extreme compute costs are why OpenAI has raised >$10B from Microsoft and a “startup” like Anthropic has already raised >$500M. Given this gold rush environment, there is increasing interest in using distributed compute to train next gen foundation models, spreading the capital costs across a wider set of participants. But such a solution requires a payment network that can settle instantly, for any amount, anywhere in the world. An impossible feat … until now.

The Lightning Network is the world’s first robust, global, real-time, payments network backed by the only 24/7 global settlement network with deep global liquidity (Bitcoin). Because bitcoin payments sent over the Lightning Network offer instant final settlement, users can pay for training contributions in real time. And because Lightning bridges from bitcoin to fiat exist in almost all countries (Hivemind has invested in many of these), users can choose to settle in their own local currency or stay in BTC. Other “Web 3” projects like Golem back in 2017 and Gensyn more recently have attempted to create their own tokens to coordinate this on-demand training cloud. But – as is my view with virtually every Web3 project – no new blockchain is necessary or even useful as bitcoin’s dominant liquidity/adoption and Lightning’s instant settlement – which is impossible for any other blockchain to achieve at layer 1 – are strictly better for distributed payouts.

B) Fine Tuning

Once a foundation model is trained, the next step is fine tuning that model with additional data for a specific use case. One of the most common types of fine tuning is Reinforcement Learning from Human Feedback (RLHF), whereby real people can rate the validity of a model’s output. This sort of federated human feedback can also be provided more efficiently with instant Lightning payments as anyone around the globe with a phone can be paid instantly for providing feedback. Companies like Stakwork are already doing this today, and I expect the trend to grow quickly, perhaps with other machines increasingly replacing humans for the labeling.

C) Serving

Even more important than federated model training is federated model serving. Once the models are trained (e.g. any of the open source models available today), anyone with a spare GPU should be able to contribute their resources to the network and get paid for providing inferences. At a recent Replit AI hackathon, Laolu and Kody – two hackers from Hivemind portfolio companies – demoed the first piece of this vision by adding a Lightning payment gateway to GPT4ALL so that anyone can get paid satoshis (tiny units of bitcoin) in real time for hosting the model. 🤯

As a next step, I’d love to see someone build a Nostr-based global marketplace where anyone can list GPU cycles and get paid out instantly over the Lightning Network. Nostr would provide the ideal coordination and identity/reputation layer as anyone with a Nostr key could post a bid or ask and retain their reputation from the rest of their Nostr interactions. Because the order book would be shared globally, it would likely grow much faster than any closed exchange.

2) Better + Flexible Data

Large Language Models (LLMs) are only as good as the data they ingest. Garbage in, garbage out. Since foundation models are trained primarily on the Internet without distinguishing fact from fiction, it makes complete sense that they often output completely erroneous statements commonly called hallucinations. While reinforcement learning from humans and other machines can help with this problem, it doesn’t solve the fundamental issue with the diet of junk information models are eating. Nostr’s open + flexible protocol for data and communications can solve this problem by providing the backbone for training open foundation models and fine-tuning private enterprise or personal models.

Open Foundation Models

Training foundation models on Nostr’s rapidly growing data set – which I believe will surpass the web in size over the coming years – can go much further. Each Nostr identity and note can be fundamentally associated with a TrustRank score based on Nostr’s open social + value graph. And because the data and trust weights are all open – any group could use it to train a new model. Perhaps one of these models will be the foundation of the Google disruptor I’m anticipating.

Fine-Tuned Private Models

Nostr’s architecture is also perfect for fine tuning open models with private data as well. This is because new relays can be easily launched and permissioned. You could imagine a world where a user chooses to publish public social media style notes to relays with maximum propagation, work notes to a relay only accessible to colleagues, family photos to a relay only accessible to family members, and journal entries to a relay only accessible by the user. You could then take a public foundation model and fine tune different AI assistants on each relay to create a team of AIs each with different data access and capabilities. This path seems similar to what Apple recently announced with their private journal app, which uses cascading models that run locally, then in iCloud, then with Apple, stripping out Personal Identifiable Information (PII) at each step.

And because these Nostr assistants are all based on the same architecture, they can easily interact with one another and any child data that they produce. Your personal private assistant could work with your family assistant to book a family vacation and your work assistant to schedule your exercise class around your office schedule. This vision for training and orchestrating an army of Nostr-based AI assistants is early, but the possibilities are extremely exciting! I discuss more about this vision here in my recent video jam with DK. For next steps, I’d love to see:

  • Someone train LLMs on the existing Nostr corpus with openly published TrustRank weights
  • A service for fine-tuning AI assistants based on data from private relays
  • A Nostr-based marketplace for AI agents

3) Machine Payments

Banking the AIs

The real power of open source AI comes when you are able to combine a wide variety of openly trained and fine tuned models with other data and services: chaining them together and equipping them with tools to navigate the Internet and wider world. This was the general thesis behind Benchmark and Sequoia’s recent investment in LangChain, one of the fastest growing open source projects ever that makes it easy to link LLMs with each other and external data.

Because interacting with other agents and virtual resources has real world costs (e.g. compute, electricity, storage, bandwidth), these AI agents will soon need to interact economically – i.e. to exchange real world value for acquiring and performing services. I see no world where these machines are applying for accounts with JPM or Visa. Instead they’ll need a payment system that doesn’t care whether they’re a human or machine, that can integrate with existing payment systems, and that allows for global micropayments to pay for API calls to other machines.

Replit founder Amjad Masad was early to identify the ideal rails for such machine payments:

Bitcoin + Lightning is the perfect monetary + payment system for machines for several reasons. First, Bitcoin/Lightning has no concept of accounts or human identity – every wallet is just a public/private key pair. Second, Bitcoin/Lightning can easily interoperate with the existing legacy financial system via services like Lightspark, River, Strike, etc. Third, Bitcoin/Lightning can facilitate real-time, global, and programmable micropayments, making it easy to pay for things like conditional API calls (e.g. imagine streaming 10 satoshis every second until the AI has paid for 1TB of storage). This vision of programmable payments for API calls is currently being developed by Lightning Labs as the L402 Protocol.

When I first wrote the above paragraph in mid May, I thought it would be at least a few months before we saw this vision to come to fruition. But at the above mentioned Replit AI hackathon, Kody and Laolu also showcased a live demo of LangChain agents making Lightning payments for gated API calls to purchase virtual resources. 🤯 This is all happening much faster than expected!

As a next step, I’d love to see someone integrate L402 payments and Lightning wallets with the LangChain agents in GPTeam, a multi-agent simulation based on the recent Stanford “Generative Agents” paper.

Benefits of Lightning Machine Payments

Because satoshis (tiny units of bitcoin) sent over the Lightning Network are fundamentally scarce bearer assets, they also offer two important properties for a world with capable machine intelligences.

First, they’ll play a critical role in finally solving payment fraud and chargebacks. In the legacy system, merchants bake in some percentage of payment fraud/false chargebacks (when a user receives a good or service but still gets their money back from a credit card payment reversal) into their overall business models and call it a day. And this is to say nothing of online identity theft, phishing, or other fraud – a growing dark industry worth billions that’s spawned unicorns like Sift Science to try and catch fraudsters. Sift is already playing a crude cat & mouse game and will soon be in a virtually impossible situation trying to outsmart the coming generations of AI that can mimic human behavior. Anecdotally, I’m hearing that fraud is already a major problem for expensive digital services like GPT-4, which cost on the order of cents per inference.

Lightning payments, however, solve this problem because chargebacks are impossible. Once a satoshi is sent across a channel, there is no way to claw that satoshi back. I would not be surprised to see Lightning payments take off over the next year to both bank the AIs and prevent them from spamming online services to death.

Second, Lightning payments put important guardrails around “AI takeoff.” One of the most common concerns in AI safety circles is that since an AI is fundamentally just a function maximizer, it will inadvertently kill everyone as an accidental side effect of maximizing a mundane function (the above mentioned paperclip problem). But if AIs have Lightning wallets and need to pay for external services in the outside world to fulfill a function, then they’ll be fundamentally limited by the only truly scarce resource in the equation – bitcoin. For a more detailed discussion of how bitcoin provides a metabolic safeguard to AI takeoff, I highly recommend watching this incredible discussion with Dhruv Bansal: “Will AI Dream of Electric Bitcoin?” Or for a pithier takeaway, I like this quote from Stakwork founder Paul Itoi, “The infinity of AI will run up against the scarcity of bitcoin.”

My ideas around the convergence of Lightning, Nostr, and AI are still early and forming in real time. But it’s all happening much faster than anticipated. Check out my latest video jam with DK for my most up to date thinking on the intersection of Lightning + Nostr + Open Source AI. If you’re a hacker or entrepreneur working on open source AI and interested in experimenting with Lightning and/or Nostr, please reach out! I plan to invest heavily in this overlap.

Thanks to Kody and Ryan for feedback on this essay. Thanks to KWeb for the artwork.