untitled(45)-1715263439.png
2024-05-09

AMA: AO and Artificial Intelligence

Author : Chloe Gan

Reviewer : outprog


This AMA session is part of the AI Crypto Hackathon hosted by Bewater and supported by the PermaDAO community. The article is divided into two sections: the main dialogue between the host and Sam, and the Q&A session where community users ask questions about AO.

Guest: Sam Williams, Arweave & AO

Hosts: outprog, PermaDAO & AO; LuLu Bewater

Main

BeWater Lulu:

Alrighty, folks. it’s time, let’s get it started. Welcome everyone to the AO & AR AMA session for the BeWater AI Crypto Hackathon. Today we have Sam & Outprog with us for 45 mins to unpack what is AO & Arweave doing in AI & Crypto. Pls refer to the previous messages for guests intro or wait for them to do the intro!!

I’ll now hand over the stage to our host 🙂 @outprog

outprog:

Thanks @luluisangry and Bewater for the invitation. I'm outprog from PermaDAO, hosting today's event.

Welcome everyone to today's AMA, and welcome Sam. Let's officially start today's AMA.

Arweave, as a decentralized storage infrastructure, has been running stably for nearly 6 years since 2018. Like the price of BTC, the data stored on Arweave has seen explosive growth.

We all know a very important event happened in the Arweave ecosystem this year—the launch of AO, marking the transformation of the Arweave ecosystem from decentralized storage to a full-stack application ecosystem supporting decentralized computing.

First, let's have @ArweaveSam introduce himself and give a brief overview of Arweave and AO.

Sam Williams:

Thanks, @outprog , and thanks to BeWater for hosting us!

This says it well. We started building Arweave as a permanent data layer to store all of humanity's most important knowledge and history around 7 years ago. The idea was essentially to create 'onchain storage' -- as people were playing with on Bitcoin since virtually the start -- but at any scale. Fast forward 7 years to today and Arweave now stores over 5 billion pieces of data and is the 'plumbing' that makes many applications in web3 work.

One of our observations along the way was that decentralized computation is just decentralized data replication plus verification. When you run an Ethereum (or even Bitcoin) node, your computer is just downloading the blocks from a peer-to-peer network and validating them.

Because Arweave is built to store any amount of data permanently (just like those Bitcoin and Ethereum swarms replicate their data set), a question arose: If we add a verification layer, does that mean that we can do smart contracts at any scale?

It turns out the answer is yes 😄. And the product of that is AO. It is essentially a decentralized supercomputer running on Arweave, with any number of parallel threads.

Our hope is that with Arweave+AO together we can build a new, decentralized form of cyberspace that is provably neutral, and guarantees the rights of its users.

outprog:

Thanks for the introduction, @ArweaveSam. Let's start with the first question. Today's topic is AI, so let's begin with AI. It's interesting to note that ao is designed using the Actor Model, and a paper "A Universal Modular Actor Formalism for Artificial Intelligence" discusses the relationship between the Actor Model and AI. Can we consider that ao, based on the Actor Model, is naturally suited for developing AI applications?

Sam Williams:

Yes, the actor model was invented at a time (not unlike today) when there was a huge amount of attention on AI research. The intelligence part ended up taking another 60 years (!) of research to get right, but the programming model was widely adopted very quickly and used in many non-AI appliances.

Now that we do have something close to (if not actually) AGI, the model makes even more sense.

Essentially at its core, the idea is that every component of a system can be an individual, autonomous agent that operates in parallel. The model fits elegantly on top of an agent-based architecture because it models the real world: Each of us in this chat app are individual and autonomous. We coordinate together by sending messages.

By using the actor oriented model, AO brings this into the computational world. Every service in the system is autonomous and individually executing. When they want to coordinate together, they do so by sending messages.

outprog:

Yes, in the Actor Model, each actor is similar to an agent. This reminds us of AI agents. @ArweaveSam Could you discuss the connection between the Actor Model and AI? What are your insights on this part?

Sam Williams:

Exactly! Agents == actors. So the actor oriented approach makes perfect sense as a hosting environment for it.

One of the things we are most excited about with AO is that it gives us smart contracts that are scalable enough to host full large language models. Tom, our CTO, and I have been hacking on LLM hosting on Arweave in the nights and weekends over the last couple of weeks: https://github.com/samcamwilliams/aos-llama

Not quite ready for a public announcement yet, but that repo is a preview if you want to check it out 😄

outprog:

Amazon! I think sam's case will soon show how this can be implemented.

Sam Williams:

One way to think about it is that AO is a new form of cyberspace, perfectly fit for agents. Inside AO, agents are autonomous, sovereign units.

We think that the first major use cases of this will be in the financial world.

Most of the economy today is actually the 'intelligence layer' -- not just settlement. This had to be done 'offchain' previously, but now we can bring it inside the smart contract environment, gaining the trustlessness they offer, too.

Imagine if all of the intelligence -- not just settlement -- of economic activity could be done onchain via trustless agents operating as smart contracts. You can build autonomous 'algo trading' funds now that offer smart contract guarantees to their users. This opens up a huge design space that was closed previously.

Long-term we think it will be so much more than that. Autonomous forms of 'life' (however you want to describe that), that can execute tasks for you trustlessly.

outprog:

Yes, automated finance, and agent finance also holds great scope for exploration! That's Awesome! can't wait and see.

Let's move on to the next question.

Currently, there are no real examples of AI and web3 integration, but ao's architecture has clearly broken this limitation. Besides chain models like EVM, developers can use ao to create applications that were previously hard to implement.

After the technological breakthrough, from the perspectives of the market and developer ecosystem, how will ao/Forward Research help advance the development of AI in the future? @ArweaveSam

Sam Williams:

The main advice would be to reach out! There are tons of groups in the Arweave ecosystem that are very keen to help projects building on AO grow. Recently, Community Labs launched AO Ventures, an incubator with a $35m investment pool to back projects building on the network.

At Forward Research we are also always happy to provide 1:1 support for people building in the ecosystem. Just ping us and we will try to help out any way we can -- from technical support, to getting the word out, or capital.

outprog:

Powerful support!

I have one final question. This hackathon hosted by BeWater is very helpful for the development of ao's developer ecosystem. PermaDAO is also committed to building the developer community in the Arweave ecosystem.

We believe there will be more offline ao ecosystem events in Asia in the future, possibly hackathons, incubators, or boot camps.

What plans or ideas does Forward Research have for supporting these activities? How to collaborate with the BeWater AI Crypto Hackathon to promote innovation and development. @ArweaveSam

By the way, the 🐘 is the mascot of Arweave!

I believe that future AI developers will all be familiar with this emoji 😊.

Sam Williams:

At Forward Research our core function is building: Both protocols and community. The latter component is often about finding the right people, then helping empower them to spread the word.

If you are interested in learning more about the ecosystem or taking part in more events, I would definitely make sure to follow PermaDAO, AOX, and @GerryWong 's Arweave Oasis!

outprog:

Let 🐘 be everywhere, and everyone can just ask @ArweaveSam if they have any questions.

Q&A

adam lee:

I have some questions about AO.

  1. I see that AO is still using a centralized system with POA. When will it be updated to POS or a more decentralized consensus?

  2. I haven't seen any token economics-related content for AO yet. When will this part be upgraded?

  3. Is there a roadmap for AO?

Sam Williams:

We will smoothly transition the bulk of activity to POS over time, as the processes that orchestrate it develop. It isn't actually 'centralized' right now -- some people do run their own SUs/CUs/MUs. As a developer you can then choose which 'authorities' to trust messages from. More 'distributed' than decentralized, but not centralized either -- but I see your point. AO itself is a data protocol on Arweave, so you can layer any number of different security systems on top.

Once PoS is live in AO, an efficient market should develop for people to run CUs (compute units), which resolve the state of processes in the network.

One of the neat things about AO is that each subnet of units that operate the network is completely elastic. There are no scalable limits for each network. Fun fact: Yesterday we increased the number of compute units in the testnet that fwd runs by 2x. Nobody noticed, other than processes resolving a little faster 🙂. This will scale to any number of units in the future.

Siyuan Han:

Sounds great! Thanks Sam. Could u introduce more about how AO supports any number of parallel threads? How does AO avoid the traditional parallel execution issues, like read-write conflict?

outprog:

I can start by answering this question regarding the Actor Model mentioned in my question. This model was proposed in 1973 and has been implemented in the Erlang programming language. In Web2, it is already a very mature architecture.

Sam Williams:

Pretty sure Telegram, that we are all using to chat right now, uses actor model programming under the hood, too!

outprog:

Yes, the Actor Model is a very mature model for handling concurrency and is also the architecture adopted by ao.

This concurrency model (Actor Model) is also highly suitable for AI. Let's hear @ArweaveSam ‘s perspective on this.

more about Actor model: https://en.wikipedia.org/wiki/Actor_model,  also you can check permadao's Chinese translation of ao spec: https://permadao.com/permadao/ao-1353cc109d434941a6757560ef35dcc2

Siyuan Han:

So, AO avoids the problem of read/write conflicts at the computational level. If AO has the ability to process transactions like a traditional highly concurrent system, with thousands or tens of thousands of threads executing at the same time, how does it handle the workload at the disk IO level? Could you elaborate on the storage and data engine technology of AO?

outprog:

Rollup, using technology similar to rollups to bundle data onto Arweave.

Siyuan Han:

like system level sharding?

Sam Williams:

Yep! The data for each process all 'rolls up' to Arweave, which is designed specifically to coordinate the wide replication of information in a peer-to-peer network.

So to some extent, when building AO we got disk I/O coordination for 'free' (because we had already spent 6 years building it 😅)

AI:

If we do some AI applications in AO, such as AI video generation, can the AO ecosystem solve the problem of GPU computing power?

We're in the middle of this hackathon. Can AO be used directly now? Do you have documentation?

Kevin Zhang:

Will there be many processes running AI handles in the future? How to maintain load balancing?

outprog:

My view is that MUs are similar to Nginx in traditional Web2, where the load balancing is distributed among countless MUs, and after PoS, the CUs will share all the computation.

Like k8s elastic scaling.

Sam Williams:

Yep! MUs are the entrypoint for the user, CUs are the 'compute cloud'

David Dot:

What AI needs is algorithms and computing power, so what problems can AI on AO solve?

Is ao token meant to re-raise funds and has it been given up to give ar more value?

Sam Williams:

Hard to parse your question precisely, but there has not been any fundraising for AO at all. We are pushing all of the VCs that want to invest in it to invest in the ecosystem of projects building on top of it. Hence that $35m investment pool I mentioned earlier 🙂

AI :

If we do some AI applications in AO, such as AI video generation, can the AO ecosystem solve the problem of GPU computing power?

I don't think I saw the AI Demo. Does AO have GPU computing power?

Sam Williams:

Not GPUs directly, although APUS (see above) is working on this. For now it is just CPUs, as WASM (running on them) provides us with deterministic computation results -- which is vital if you want to have smart contract verifiability.

Jason Wu:

Not so far as I know. Apus Network is providing GPU computing power for AO. We're going to do some simple demos. It is currently possible to generate images. Large language models and video generation are not yet open. You can contact us if you need anything. I can provide some demos.

Miami Fish:

Is there any kind of consensus mechanism for how the SU validates requests and submits to the CUs to process, eg strictly by timestamp or some kind of priority based on economic incentives?

outprog:

Yes, SUs are used to allocate nonce, and the calculations obtained by CUs are performed in exactly the same order as the nonce.

Here's a paper about msg delivery, also in the ao spec https://groups.csail.mit.edu/tds/papers/Lampson/FORTE93.pdf

Sam Williams:

Exactly as @outprog says. SUs provide a Slot-Assignment to each message. In the PoA testnet, you need to trust your SU but you can even run it yourself if you like. In the full PoS network, you will have staked assurance of SU correctness, and be able to 'fallback' to Arweave's consensus (like 'exit to L1' in rollups), should there ever be an issue.

Miami Fish:

Thanks.  So in POS, does SU get assigned automatically (like whoever picks up my request first)?  I am thinking abt this more from a financial application, say during a liquidation event, different ppl trying to submit liquidation request at around the sametime, so whoever's request get processed first affects the outcome of the others.

Sam Williams:

I will quickly answer before my call starts -- happy to provide more info if helpful some other time.

The deployer of the process gets to choose the SU -- whether that is the developer, or another process that spawns it as a 'child' process.

After PoS, if the SU stopped processing messages you can 'challenge' them on the AO-Sec Origin process to provide a slot assignment. If they don't the process becomes unhosted, which is then resolved by SUs essentially 'bidding' to become its new host.

Lots of intricacies there, but that is the broad picture. I lets every process in AO inherit the liveness and censorship resistance guarantees of Arweave, while running on a fast SU in normal operation 🙂

Ok, got to go now. Happy hacking everyone!

From BeWater AI Crypto Hackathon Group Chat:

https://t.me/+jEzmL8PUfo4xYjQ1

In AO
Tagged with In AO

Sign up for newsletter

Sign up here to get the latest news and updates delivered directly to your inbox.