Live data from Hacker News

Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

modal.com

11–20 of 23 posts

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#11
post #6

Earlier quoted context omitted.

How can you cut latency by more than 1x? I am no intending to be snarky, it just doesn’t fit my brain how you can reduce a measure time by more than the original starting time.

probably just AI slop and using wrong semantics, they mean speedup ratio.

You're absolutely right!

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#12
post #10

I've recently been going down the rabbit hole of creating a "fast start dev env" and it's interesting to see how this article differs from other approaches (codesandbox has some fantastic blogs, the fly.io blog on sprites has interesting pointers, e2b and daytona are related open source tools). Everyone has a different solution based on their tradeoffs. I thought the memory snapshotting part in particular was clever…

Our system somewhat predates ublk; at the time we wrote it, FUSE was the most reasonable option. Moving over to ublk would require re-architecting around block devices rather than filesystems, but is indeed something we're looking at!

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#13
post #9

There are plenty of cool advancements in reducing inference cold start when I was meeting with folks in person at FOSDEM this year. However, I still struggle to understand: why would folks care about this? Major AI Labs all have secured their own compute in the form of hardware, data center, and power generation. That means their resource pool is fixed, and they can do all sorts of tricks to pre-load, pre-allocate, e…

At least folks like me care about it. My local hardware is more than enough to handle my app, but given Spectrum's internet service is as fickle as a broken fiddle I'm forced to rent a dedicated cloud gpu that sits idle most days. However, I would save a serious chunk of change if I could boot up a GPU snapshot in ~10s. I evaluated various options a while back and, while modal.com was the fastest, it still took around a minute-ish. Granted, my use case is unique, but I imagine this could be a decent solution for gpu-poor ComfyUI users.

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#14
post #10

I've recently been going down the rabbit hole of creating a "fast start dev env" and it's interesting to see how this article differs from other approaches (codesandbox has some fantastic blogs, the fly.io blog on sprites has interesting pointers, e2b and daytona are related open source tools). Everyone has a different solution based on their tradeoffs. I thought the memory snapshotting part in particular was clever…

Our system somewhat predates ublk; at the time we wrote it, FUSE was the most reasonable option. Moving over to ublk would require re-architecting around block devices rather than filesystems, but is indeed something we're looking at!

Fair enough, would love to see another writeup on the performance you observe even if it fails - in practice numbers are hard to come by.

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#15
charles, amit, can you go into more about the path based caching? Particularly "shared bytes aren’t guaranteed to be in the exact same container image layer"? I've built something that solves issues around sharing data between layers, and am interested to see if it fits usecases like Modal's.

Edit: "The solution is to disaggregate the container launcher (runc for Docker, runsc for gVisor) from the container image delivery" is exactly what I've done! I've not built a lazy FUSE on top of it (yet! except for cache mounts in BuildKit), but it's on my TODO list. I guess I'm mainly curious what stops bytes from being shared in your case.

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#16
post #9

There are plenty of cool advancements in reducing inference cold start when I was meeting with folks in person at FOSDEM this year. However, I still struggle to understand: why would folks care about this? Major AI Labs all have secured their own compute in the form of hardware, data center, and power generation. That means their resource pool is fixed, and they can do all sorts of tricks to pre-load, pre-allocate, e…

[deleted]

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#17
post #15

charles, amit, can you go into more about the path based caching? Particularly "shared bytes aren’t guaranteed to be in the exact same container image layer"? I've built something that solves issues around sharing data between layers, and am interested to see if it fits usecases like Modal's. Edit: "The solution is to disaggregate the container launcher (runc for Docker, runsc for gVisor) from the container image del…

To clarify: we do content-based hashing, and when we say "shared bytes aren’t guaranteed to be in the exact same container image layer", what we mean is that

FROM some/image RUN pip install torch==2.7.1

and

FROM another/image RUN pip install torch==2.7.1

will produce images with very high overlap in contents, which will be shared by a content-based cache, but those images' final layers are disjoint from the perspective of a layerwise cache.

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#19
post #9

There are plenty of cool advancements in reducing inference cold start when I was meeting with folks in person at FOSDEM this year. However, I still struggle to understand: why would folks care about this? Major AI Labs all have secured their own compute in the form of hardware, data center, and power generation. That means their resource pool is fixed, and they can do all sorts of tricks to pre-load, pre-allocate, e…

I work in a slightly different domain and I focus a lot on optimizing coldstarts.

Here's my 2cents: improve cold starts also means utilizing resources more effectively.

From cloud providers to end users - every ms both adds up and translates to additional waste of electricity/hardware and costs.

Re: Cutting inference cold starts by 40x with LP, FUSE, C/R, and CUDA-checkpoint

#20
post #15

charles, amit, can you go into more about the path based caching? Particularly "shared bytes aren’t guaranteed to be in the exact same container image layer"? I've built something that solves issues around sharing data between layers, and am interested to see if it fits usecases like Modal's. Edit: "The solution is to disaggregate the container launcher (runc for Docker, runsc for gVisor) from the container image del…

To clarify: we do content-based hashing, and when we say "shared bytes aren’t guaranteed to be in the exact same container image layer", what we mean is that FROM some/image RUN pip install torch==2.7.1 and FROM another/image RUN pip install torch==2.7.1 will produce images with very high overlap in contents, which will be shared by a content-based cache, but those images' final layers are disjoint from the perspecti…

Thank you
Post reply on HN