← All AI Engineer talks

AI Engineer World's Fair 2024

State Space Models for Realtime Multimodal Intelligence

Karan Goel· Founder & CEO, Cartesia14:26

Read the talk

State Space Models for Real-Time Multimodal Intelligence

Voice, video and sensor streams keep arriving while a model works. Karan Goel explains how compressing that information into recurrent state changes the architecture of continuous inference.

From a talk by Karan Goel

When intelligence must keep up with a stream

A model can spend a long time reasoning through a difficult mathematics or physics problem. Incoming audio or sensor data presents a different problem: the stream continues while the model works. The system must keep interpreting information or generating a response as inputs arrive. This is the distinction between batch intelligence and streaming intelligence.

A familiar batch interaction is to call a model in the cloud, wait several seconds and receive an answer. Streaming applications repeatedly ask for responses at low latency. That distinction concerns the interaction pattern, not whether computation happens in a data center: a cloud service can also serve a stream. The requirement is to keep pace with an ongoing exchange rather than finish one isolated request.

0:000:25
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:00 · section reference included

Voice, devices and robots impose practical constraints

Conversational voice makes responsiveness immediately useful. You should be able to speak to an assistant, have it understand you and ask it to perform tasks. An assistant that remains available on a phone or laptop adds another constraint: it must operate efficiently enough to stay available without consuming excessive power.

Generated game worlds extend the idea beyond conversation. Imagine playing a game whose world is generated as you interact with it, much as a GPU renders graphics in real time. Robotics brings these demands together in one device that must interpret its surroundings and act. Making intelligence faster and cheaper determines where these experiences can run.

The conversational examples are deliberately mundane: handling customer support, answering health-insurance questions or calling a vendor to arrange shipment pickup. These coordination tasks consume human time even when the underlying problem is straightforward. Automating them could leave people available for difficult or consequential cases, including an especially frustrated customer. A robot faces the corresponding physical challenge: ingest audio, video and sensor data together, then respond quickly enough for the interaction to remain useful.

1:281:43
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:28 · section reference included

Build compression into the model

Karan Goel connects Cartesia’s work on real-time foundation models to a question from his doctoral research: can a model compress information as it arrives, making streaming part of its basic operation? State-space models, or SSMs, pursue this direction. Mamba is a more recent selective-state-space model in that research lineage; it is not a name for every SSM or every model Cartesia builds.

At Cartesia, the research question becomes how to improve these architectures and push their capabilities. The motivation is to explore designs beyond the standard transformer recipe. If the application requires continuous processing, compression and efficient memory use should influence the architecture from the beginning.

3:564:10
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:56 · section reference included

A day of footage is not a day of useful events

Long context matters because much practical data arrives in long sequences. Text already concentrates information: a few sentences can communicate a great deal. Audio and video can contain much more redundant material. A security camera running for a day illustrates the difference between the volume of incoming data and the amount worth remembering.

The architectural question is what to retain. Keeping the entire history available lets a model consult it later. Compressing the stream instead asks the model to carry forward information useful for understanding and future decisions. The camera example motivates task-relevant memory, not a lossless recording hidden inside a smaller representation.

The talk estimates annual human sensory exposure at roughly one billion text tokens, ten billion audio tokens and one trillion video tokens, excluding other sensory inputs. These are back-of-the-envelope quantities without a specified tokenizer or sampling convention. Their purpose is to evoke the scale of simultaneous streams handled by a compact biological system, which continues operating as its energy intake varies.

For comparison, the talk places leading model contexts of the period at approximately ten million to one hundred million tokens. This is a historical order-of-magnitude assertion, not a comparison of named benchmarks. The larger ambition is a long-lived system that can understand information across extended periods. Human memories reaching back thirty years provide the motivating analogy: useful information remains available without consciously replaying every intervening experience.

Goel’s slide puts books, audio, biology and interactive systems side by side as long-sequence workloads.
Goel’s slide puts books, audio, biology and interactive systems side by side as long-sequence workloads.
5:265:36
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:26 · section reference included

What grows with context length

The computational problem becomes sharper as multimodal sequences grow. With model dimensions fixed, dense attention performs quadratic attention work over a full sequence.

It helps to distinguish three costs:

  • Full-sequence attention: the aggregate attention work is quadratic in sequence length.
  • Cached next-token attention: the new position attends over a growing prefix; it does not require recomputing every previous token’s representation.
  • Retained history: the key/value cache grows as positions are added.

For fixed model dimensions and dense attention over the retained prefix, cached next-token attention work and KV-cache storage grow linearly with prefix length. Quadratic aggregate work does not mean every individual decoding step is quadratic.

More compute can support harder tasks, but it does not remove that dependence on sequence length. Audio and video intensify the problem because they can supply far more positions to process than a compact text exchange.

The talk considers hypothetical inference demand increases of a thousandfold or a hundred-thousandfold. These scenarios show why architectural costs matter beyond a single request: an expensive operation becomes harder to deploy everywhere when it must run continuously at enormous volume. Transformers have nevertheless provided a successful recipe for scaling models, so the aim is to improve efficiency while preserving capability.

For a fixed recurrent model, an SSM can process a sequence with work linear in its length while keeping recurrent state size independent of that length. Compression happens as information arrives, creating opportunities for lower memory use and lower-power execution. Actual speed and energy use still depend on model size, hardware and implementation; bounded recurrent state does not mean the entire system consumes constant resources.

8:138:23
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:13 · section reference included

Retain the history or update a state

The talk makes the difference concrete with the prefix the quick brown fox and the next word jumped. An attention-based model consults representations of the preceding positions to produce the continuation. It then adds the new position to its context and repeats. With caching, earlier keys and values remain available while the new position contributes additional entries.

A recurrent SSM carries a different kind of memory forward. Each incoming token updates an internal state; subsequent processing uses that state without needing to retain the raw token sequence inside it. The talk’s compressed-file analogy describes a summary, not literal ZIP encoding or a guarantee that every earlier detail can be recovered.

The talk’s fox example contrasts attention to past tokens with an updated, compressed recurrent state.
The talk’s fox example contrasts attention to past tokens with an updated, compressed recurrent state.

The illustration isolates this memory choice with a toy scalar recurrence and inputs 1, 2 and 3. Its values are teaching choices, not Mamba or Cartesia parameters. The input strip remains visible so you can follow the example; the retained-memory panels distinguish the carried state from the growing schematic attention cache. They compare what remains available, not execution speed.

One state, updated as inputs arrive

Follow a toy recurrence through 1, 2 and 3. Its scalar state illustrates compression, not Cartesia's model parameters.

ht+1=0.5ht+xt+1h_{t+1}=0.5h_t+x_{t+1}
  1. x11next input
  2. x22waiting
  3. x33waiting

Start with h0 = 0. Process the first input to update it.

Recurrence retains
h00

One scalar. The next update uses this value.

Attention cache retains
No processed positions yet

Earlier keys and values stay as positions are added.

The recurrence keeps a summary, not a lossless copy of the prefix. The cache sketch compares what is retained, not latency or computation.

This repeated update is recurrence: the previous state participates in constructing the next one. The talk describes renewed interest in that approach as an alternative to retaining an expanding history for later consultation.

8:239:48
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:45 · section reference included

Compression changes which details remain available

Looking ahead from the talk, the forecast is that multimodal workloads will make recurrent architectures more relevant over the following three to five years. Efficiency alone, however, does not answer the question of quality. Compression gives up direct access to some past detail in exchange for a more compact representation.

Return to the same twenty-four-hour camera stream. Summarizing it as it arrives may make relevant events easier to use than repeatedly consulting the entire recording. But whether that helps depends on what the summary preserves and what questions come later. The talk proposes that compression is especially helpful for long contexts, where redundancy is substantial, and less helpful for short ones. This is a task-dependent intuition illustrated by the camera example, rather than a reported camera benchmark or a guarantee across tasks.

12:0112:15
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:01 · section reference included

Voice generation brings the architecture back to latency

The closing application is Cartesia’s recently released text-to-speech model, the original Sonic. Voice generation is an initial step toward bringing more multimodal data into a single model, with SSMs supporting training and inference. The reported benefit is responsiveness: the playground is described as returning generated voice almost immediately from a data center.

Work on running these models on Macs and other devices aims to bring that experience to local hardware efficiently and at low power. That remains distinct from the cloud playground described in the talk. Time expires before a live demonstration, leaving the audience with the invitation to try play.cartesia.ai and provide feedback. No on-device demonstration is completed.

13:0313:19
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

13:03 · section reference included

Resources

From the talk

  • MambaPaper4:36

    Selective state spaces and the original linear-time sequence-modeling argument.

Read the complete timestamped transcript
  1. 0:00

    [on-hold music] Maybe to set the stage a little bit, um, the last four or five years of AI have basically been really focused on this idea of batch intelligence, which is sort of, um, pretty core to this, uh,

  2. 0:25

    idea of, uh, building, like, an AI system that can reason, uh, for long periods of time on a problem and then, uh, solve it. So you can think about, like, math problems or, you know, physics problems that are hard.

  3. 0:36

    Um, there's a lot of applications where actually what you need are systems that are streaming. So they're real-time, they, uh, work instantly. So imagine, um, generating video, audio, or, um, doing, like, understanding applications on, um, sensor streams, et cetera.

  4. 0:51

    So, um, so it sort of bifurcates where there's these two different types of, uh, applications, similar to how there's, you know, generally this idea of having, uh, batch workloads and streaming workloads.

  5. 1:01

    And so, um, a lot of what we've seen over the last few years has really been focused on, uh, batch APIs where you call a model in the cloud, it takes a few seconds, and then you get a, a pretty good response back.

  6. 1:12

    Um, and now we're seeing some shift towards more real-time applications where you constantly will be querying a model and, um, h- asking it to return responses at low latency and then, uh, using that to sort of interpret, uh, or generate information.

  7. 1:28

    Um, and I think this, you know, this area is really exciting because it's going to be transformative to a lot of interesting applications that, um, have so far actually not necessarily been, uh, the main focus for, uh, a lot of what we've seen, uh, over the last few years.

  8. 1:43

    So conversational voice, uh, is an example of this where you should be able to interact with a system and then talk to it, um, a-and it should be able to understand you and, and do all kinds of, uh, tasks on your behalf.

  9. 1:54

    Uh, this is similar to having assistants, um, that are on device and run kind of really efficiently at low power, um, at, you know, all times, um, regardless of whether you're on a phone or, or a laptop.

  10. 2:06

    And then, um, things like world generation where, like, you can imagine actually playing a game that is generated in real time similar to, um, how the graphics are rendered, um, on GPUs.

  11. 2:15

    Um, and, um, all of this, you know, should be able to happen in real time, on low power, on your phone, uh, on your MacBook, et cetera. Um, robotics is another great example where it sort of culminates with all of these coming together on a, on a, a single, um, uh, device that is, uh, trying to kind

  12. 2:35

    of interpret everything in the world. And so I think this is sort of the ex-exciting intersection, which is like, how do we make intelligence faster and cheaper so that we can put it, um, everywhere, basically.

  13. 2:47

    Um, and a couple examples that are really powerful. Real-time intelligence for conversational interfaces, uh, is gonna be really interesting because you would be able to have a agent that can provide customer support for a problem, answer questions about health insurance, uh, you know, call your vendor to pick up a shipment.

  14. 3:04

    A-all these coordination tasks that, uh, generally are, um, annoying to do should be really automated and, uh, real-time intelligent agents should be doing them. Um, and then humans can spend their time solving sort of harder problems that are, uh, more interesting and, uh, in customer support, that could be dealing with, uh, you know, the tail customers that

  15. 3:22

    are, uh, much more important because they're pissed off or they're, uh, uh, uh, more important because they have, uh, you know, more customer value, et cetera. And similarly in robotics, there's this idea of, like, ingesting similar to humans, like audio, video, sensor data, and then responding instantly to a lot of these, um, uh, pieces of information.

  16. 3:40

    So I think this is sort of the, the world we, we should be living in where all of these intelligent models run super fast, they solve all these different problems and, uh, they're able to really kind of, um, power these new experiences that are interactive at their core.

  17. 3:56

    So this is where we come in. We're building, uh, these real-time foundation models. So, um, some of what I'll talk about is, uh, the work we've done in really building kind of new ideas for how you can create, uh, deep learning models.

  18. 4:10

    So, um, I did my PhD before this. I was working with a lot of these folks for my PhD. Chris was our PhD advisor. Um, and, um, we were really focused on this idea that you should be able to have a model that can compress information as it comes into the model and, um, use that to really

  19. 4:26

    kind of build powerful systems that are streaming at their core. Um, and I'll talk a little bit about this, but that's really the technology that we've been working with for the last four or five years.

  20. 4:36

    We've been developing in academia, and some of you might have heard of things like Mamba, which is sort of a, a more recent iteration of this technology. You know, we-- I did my PhD working on some of the early iterations that nobody uses anymore, but, um, are sort of the precursors to a lot of the modern stuff

  21. 4:51

    that is now, uh, more widely used. And, uh, and now what we're doing at Cartesia is basically taking this and trying to understand how we can improve it. Mmm, how do we push the boundaries on, uh, what architectures can do?

  22. 5:02

    And, um, and I think it's an interesting question because, you know, we should not settle for having a, uh, one way of doing things. I think that's sort of a, a poor way to kind of, um, think about the future.

  23. 5:13

    So our approach is sort of like, let's think about new ways of actually designing models that aren't necessarily built on, let's say, the transformer architecture and the standard recipe for, uh, deep learning that's, uh, you know, prevalent today.

  24. 5:26

    And I think it boils down to this question of, like, efficiently modeling long context is a huge problem because, you know, a lot of practical data is really long sequence data.

  25. 5:36

    I think text is maybe the least interesting, uh, long sequence data because text is actually fairly, uh, compressed already, right? Like, you have a lot of information that is, uh, embedded in two minutes of, uh, or, uh, two sentences of text.

  26. 5:49

    But there's all these other domains where, you know, audio, video, et cetera, where there's so much information. Um, you know, imagine looking at a security camera for a day.

  27. 5:57

    Like, you would probably have just so much information coming into the system and just, um, very little of that would be useful. So compression is kind of really fundamental to intelligence because we're able to do this where we can look at all this information and then sort of compress it down to whatever's necessary to remember or understand.

  28. 6:15

    Um, and I think so far what we've seen is that the AI systems that we built-

  29. 6:18

    Have not necessarily exhibited that same behavior. So they're really kind of built not on the principles of compression, but more on this idea of retrieval, like keeping all the context around and then using it to reason over all the information that you've seen.

  30. 6:30

    So I think, um, our kind of point of view is that multimodal AI will remain challenging as, as long as you're sort of, uh, working in this paradigm. Because, uh, if you try to think about what humans do in a year, um, you're basically processing understanding about a billion text tokens, ten billion audio tokens.

  31. 6:48

    These are, you know, back of the envelope calculations that I did. And about a trillion video tokens, probably underestimates how much video we process, and not including all the other sensory information that you're processing, and you're doing it simultaneously, and you're doing it on a computer that fits in your brain.

  32. 7:03

    Um, and you, you know, sometimes don't eat and drink and, you know, you're still functioning fine, so you know, you can have variable amounts of power in the system.

  33. 7:12

    Um, so I think the idea that like intelligence is solved is sort of very far from the truth because humans just are an extremely amazing machine that, uh, does something very extraordinary, um, in a very compressed way that, um, our AI models can't do.

  34. 7:27

    So I think that's sort of our, uh, you know, sort of, uh, the reason we get up in the morning is we think about this and we're like, yeah, we're very far away from where we should be.

  35. 7:35

    Um, and the best models today are in the, you know, ten million, a hundred million sort of token range. So, uh, that's really good. A lot of progress has been made, but really this is sort of what we aspire to is how do you kind of build these machines that are long-lived that can actually understand information over

  36. 7:51

    very long periods of time? And I think the cool thing is like, as a human, you can remember things that happened thirty years ago with very little effort. You don't need to do RAG or retrieval or anything.

  37. 8:00

    You just, you know, you remember it. It's just it in your brain, and then you figure it out, basically. So I think that's kind of an extraordinary capability that we should be able to put into our, uh, AI models as well.

  38. 8:13

    And so, uh, some of the big problems with models today are, uh, you know, they're built on transformers really optimized for data center. I think, um, we see this with like a lot of the work we did, which was on subquadratic models.

  39. 8:23

    So quadratic scaling and context length really just means that, um, you know, the amount of, uh, computation you have to do to process long amounts of, uh, context is very large.

  40. 8:33

    And so right now, the sort of predominant approach is to throw compute at that problem and then hope that that would scale. Um, obviously, compute is a very important piece of the puzzle because you do need more computation to be able to do more difficult things.

  41. 8:45

    But, um, this type of approach, because the quadratic scaling actually has poor scaling with, you know, very large multimodal context. And text context tend to be shorter. Multimodal context will get larger because you have just way more tokens and information that's going into the system.

  42. 8:59

    So that's gonna be a big challenge for these models, especially how do you do this inference efficiently so you're not, you know, burning down the data centers to, you know, do, uh, a fairly limited amount of inference.

  43. 9:09

    Like, you have to imagine that we're doing a thousand times or, um, you know, a hundred thousand times more inference. And then, um, if the models are scaling the same way, it's gonna be really, really, really expensive.

  44. 9:19

    So you're not gonna be able to permeate all these applications that I talked about very easily. Um, and so, you know, that's sort of a big challenge, I would say.

  45. 9:27

    A-and so, you know, again, our hypothesis is you need new architectures, and that's kind of where we spend our time, and we wanna make these models more efficient, faster, more capable, while being able to handle all these long context problems.

  46. 9:37

    Um, this is a slide about, you know, transformers being somewhat inefficient at handling this, um, but obviously, um, a very good recipe for scaling, uh, uh, these models out.

  47. 9:48

    And so, you know, some of the work that we've been doing is new, fundamentally efficient architectures. So they have compression at their core. So they sort of-- The way they operate, uh, I'll, I have a slide on this just to give you kind of a, a, a quick illustration, but, um, they really scale more linearly in context

  48. 10:04

    length. So you should be able to have, uh, because of this, like, more low power implementations of these models, um, you can compress information as it comes into the system, you have low memory usage, um, and you can actually scale to much more massive context because of that.

  49. 10:21

    Um, and this is all the work around SSMs. I just threw this, uh, nice slide, which I thought was cool. Um, Jensen had an interesting quote about SSMs in one of his Wired articles that I like to keep talking about.

  50. 10:31

    But, uh, uh, but I think it's a cool technology that has a lot of potential and sort of that's where we're, um, spending a lot of our time. And if you folks are interested in reading more, there's lots of videos on YouTube and lots of sort of resources that try to make this more accessible to understand and,

  51. 10:45

    and kind of get into some of the details. Um, but, you know, the working intuition is basically, uh, transformers are generating quadratically by attending to every past token of information.

  52. 10:54

    So as tokens come into the system, you're kind-- sort of keeping them around and then looking at all the past tokens. So if you wanna generate the word jumped, uh, from the quick brown fox, you would actually look at the entire context, try to understand what the next word should be, and then, um, generate it, push it

  53. 11:09

    into the context, do it again. Uh, with SSMs, you just have a streaming system. So you, you have a to-- uh, token stream in, uh, they update an internal memory for the model, and then the token gets thrown away.

  54. 11:19

    So that actually really simplifies the system, and that's why it's such a core sort of streaming interface, because you're just not keeping all this memory around about what happened in the past.

  55. 11:27

    You're compressing it into some sort of zipped file, uh, state inside the model that's gonna be used to do a future generation.

  56. 11:36

    And so this is sort of taking this idea of, uh, taking advantage of this idea of recurrence, which is sort of core to how even humans, uh, do a lot of their reasoning.

  57. 11:45

    And, you know, last few months, a lot of these models have been getting adopted. So it's great that, you know, a lot of folks are now excited about the, uh, this, you know, alternate way of doing things that is much more, uh, sort of are oriented around this idea of recurrence rather than, um, retrieval.

  58. 12:01

    Um, and so I think, like we'll see a lot more activity in this, especially with multimodal data becoming more important. And, uh, you know, a lot of the challenges of multimodal data around efficiency will mean that I think that these models will have more of a role to play in the next three to five years, um, as

  59. 12:15

    we also do our work in, uh, scaling them up and making them more interesting. A lot of people ask me about quality. Uh, I only have a few minutes, so I'll go through this, uh, the rest of the slide super fast.

  60. 12:24

    But Um, you know, SSMs generally have the right, uh, quality. Obviously, there's a trade-off between compression and keeping all of the information around. Uh, but actually, like, compression can be helpful.

  61. 12:36

    So if you imagine the security camera example, if you're watching twenty-four hours of footage, actually compressing all of that information on the fly would help you solve tasks and a- answer questions better, uh, rather than looking at all twenty-four hours every time.

  62. 12:48

    So I think that's sort of the rule of thumb to think about, which is compression's super helpful for a large context, uh, not as helpful for, um, short context.

  63. 12:55

    And so we see that quality actually is very good for long context problems and, and multimodal problems. Let me talk quickly about some of the work we've been doing.

  64. 13:03

    So we've been starting to work on sort of multimodal data, and we did a release a few weeks ago for a, uh, voice generation model. So this is sort of text-to-speech and sort of in line with some of the work we're doing to bring more multimodal, uh, data into a single model, um, and use SSMs to power

  65. 13:19

    the inference and the training and, and so on. So this is a model you can actually play with. I'll try to show you a demo. But, um, one of the things we're proudest of with this model is that we really shrunk the latency down, so when you play with it on the playground, you get instant voice back

  66. 13:32

    generated from the data center. And there's some cool work we're doing to actually run these models on Mac, um, and other devices so that you can basically have the same experience as you have in the data center, but on any device and, and do that efficiently and at low power.

  67. 13:45

    How much time do I have? You have four seconds. Okay. We're, we're out of time, but I was also almost done. So, um, go to the website play.cartesia.ai. I unfortunately couldn't walk through the demo, but, um, play with it and, um, send us feedback.

  68. 13:58

    This is my email in case you wanna, uh, send me a note. Uh, would love to hear feedback and anything that you folks, uh, find interesting. Thank you. [clapping] [upbeat music]