HNHacker News
TopNewBestAskShowJobs

za_mike157

64 karma · joined February 6, 2021

submissionscomments
za_mike157··on Reduce GVisor Cold Starts with GPU Snapshotting
Thanks for this! We did see it and it was committed long after we already implemented this functionality. However, there are a lot of edge cases that this commit doesn't deal with that users are going to have to do
za_mike157··on Reduce GVisor Cold Starts with GPU Snapshotting
Interesting! I didn't see they released this. Do you know what their benchmarks are? I know for cloud run they are pretty slow
za_mike157··on Reduce GVisor Cold Starts with GPU Snapshotting
Us and the team from Modal have been upstreaming things to the GVisor repo (https://github.com/google/gvisor/pulls) in order to make it compatible with cuda-checkpoint and other parts of our system. While we are both contributing fixes and performance improvements we are unfortunately leaving some secret sauce on the side but hopefully it should get most folks to a successful implementation as is
za_mike157··on Reduce GVisor Cold Starts with GPU Snapshotting
haha you are right that the title is a bit strange - should just be "Reduce GPU cold starts with snapshotting"

I can't read good ;)

za_mike157··on Reduce GVisor Cold Starts with GPU Snapshotting
No we don't use it. CRIU is used for normal checkpoint/restore of Linux processes. Since we run GVisor for container isolation we use their checkpoint/restore support for the sandboxed process state.

Both approaches still need NVIDIA’s cuda-checkpoint for the GPU side, because CUDA/GPU memory and driver state are not something a normal process checkpointing tool can handle on its own.

za_mike157··on Reduce GVisor Cold Starts with GPU Snapshotting
There are a lot of similarities.

They run their snapshot agent as a Kubernetes DaemonSet, whereas our implementation runs as part of the Cerebrium container runtime path. Under the hood, both approaches rely on cuda-checkpoint, since cuda-checkpoint is currently the main primitive NVIDIA exposes for interacting with GPU memory during checkpoint/restore.

One difference is how KV cache handling is exposed. NVIDIA’s approach appears to automatically handle KV cache allocation/deallocation, whereas today we expose that choice to users (vLLM and SGLang expose primitives to to his). In some cases, users may want to discard the KV cache to reduce checkpoint size and restore time; in others, preserving it may be useful.

Their DaemonSet approach is also nice because it can be more portable across Kubernetes environments and clouds. Our approach is more deeply integrated into the node/runtime layer, which gives us tighter control over the serverless startup path, but also means it depends on custom node VM images, which not every provider supports equally.

The optimizations they mention around parallel memfd restore and Linux native AIO for anonymous memory could also be applied to our architecture if we find them stable and beneficial. That said, our current results are already pretty close. For example, they report restoring Qwen3-8B in 4.7s with those changes, while we currently restore it in 6.49s.

The biggest thing we are excited for is multi-GPU restore, which is not supported yet. That would unlock a much broader set of workloads.

za_mike157··on Reduce GVisor Cold Starts with GPU Snapshotting
Hey! Yes you are correct! We have both been upstreaming changes to the main GVisor repo. However, in order to work within our own infrastructure we had to make various changes that we explain throughout the article (Open TCP connections, multiprocessing, unix sockets etc).

Also in our benchmarks we seem to perform better than Modal by ~20% in 4/6 workloads we tested and have a lower spread of results meaning you get more consistent results. However the same fundamentals still apply -> how can you move storage into memory as quickly as possible

za_mike157··on The 1979 Design Choice Breaking AI Workloads
Glad you liked it!
za_mike157··on The 1979 Design Choice Breaking AI Workloads
You are correct! From our tests, storing model weights in the image actually isn't a preferred approach for model weights larger than ~1GB. We run a distributed, multi-layer cache system to combat this and we can load roughly 6-7GB of files in p99 of <2.5s
za_mike157··on The 1979 Design Choice Breaking AI Workloads
A lot of AI workloads require GPUs which are expensive so customers would waste money running idle machines 24/7 with low utilisation which kills gross margins. By loading containers quickly means, means we can scale up quickly as requests come in and you only need to pay for usage.

This is successful for CPU workloads (AWS Lambda) but AI models and images are 50x the size

za_mike157··on How to Migrate from OpenAI to Cerebrium for Cost-Predictable AI Inference
Hey! Founder of Cerebrium here.

- Runpod is one of the cheapest but it comes at the price of reliability (critical for businesses) - We have more performant cold start performance with something special launching soon here - Iterating on your application using CPUs/GPUs in the cloud takes just 2–10 seconds, compared to several minutes with Runpod due to Docker push/pull. - Allow you to deploy in multiple regions globally for lower latency and data residency compliance - We provide a lot of software abstractions (fire and forget jobs, websockets, batching, etc) where as Runpod just deploys your docker image. - SOC 2 and GDPR compliant

With that all being said - we are working on optimisations to bring down pricing

za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
I haven't used SkyPilot so I am unfamiliar with the experience and performance.

However, some of the situations you would like to use Cerebrium over Skypilot are: - You don't want to manage you own hardware - Reduced costs: With serverless Runtime and low cold starts (unclear if SkyPiolet offers this and what the peformance is like if they do) - Rapid iteration: Unclear of the deployment process on SkyPilot and how long projects take to go live - Observability: Looks like you would just have k8s metrics at your disposal

za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
I think we used this UI kit: https://minimals.cc/
za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
I guess then the next question would be how quickly can they start executing your container from cold start when a workload comes in? Typically we see companies on around 30-60s
za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Do you mean why the individual file names aren't quoted?

You can see an example config file at the bottom of that link you attached - agreed we should probably make it more obvious

za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Thanks for confirming! Our cold start, excluding model load is 2-4 seconds typically for HF models.

The only time it gets much longer when companies have done a lot with very specific CUDA implementations

za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Thanks Tom! Excited to to support you and the team as you grow
za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Ah I see they recently cut their pricing by 40% so you are correct - sorry about that. It seems we are more expensive compared to their new pricing
za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Thank you - appreciate the kind words! Happy to continue supporting you and the team.
za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Thank you - updated! My team makes fun of my spelling all the time!
za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Thanks for pointing that out!
za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Modal is a great platform!

In terms of cold starts, we seem to be very comparable from what users have mentioned and tests we have run.

Easier config/setup is feedback we have gotten from users since we don't have and special syntax or a "Cerebrium way" of doing things which makes migration pretty easier as well as doesn't lock you in which some engineers appreciate. We just run your Python code as is with an extra .toml setup file.

Additionally, we offer AWS Inferentia/Tranium nodes which offer a great price/performance trade-offs for many open-Source LLM's - even when using TensorRT/vLLM on Nvidia GPU's and gets rid of the scarcity problem. We plan to support TPU's and others in future.

We are listed on AWS Marketplace as well as others which means you can subtract your Cerebrium cost from your commited cloud spend.

Two things we are working on that will hopefully make us a bit different is: - GPU checkpointing - Running compute in your own cluster to use credits/for privacy concerns.

Where Modal does really shine is training/data-processing use cases which we currently don't support too well. However, we do have this on our roadmap for the near future.

za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
Yes RunPod does have cheaper pricing than us however they don't allow you to specify your exact resources but rather charge you the full resource (see example of A100 above) so depending on your resource requirements our pricing could be competitive since we charge you only for the resources you use.

In terms of cold starts, they mentioned their cold starts are 250ms which I am not sure what workload that is on, or if we have the same measure of cold starts. We have had quite a few customers that we have told us we are quite a bit faster 2-4 seconds vs ~10 seconds although we haven't confirmed this ourselves.

For a 30GB model, we have a few ways to speed this up such as using the Tensorizer framework from Coreweave, we cache model files in our distributed caching layer but I would need to test. We see reads of up to 1GB/s. If you tell me the model you are running (if open-source) I can get results to you - you can message me on our Slack/Discord community or email me at michael@cerebrium.ai or

za_mike157··on Launch HN: Cerebrium (YC W22) – Serverless Infrastructure Platform for ML/AI
You are correct! After the first request, an image will be on a machine and it’s cached for future use. This makes subsequent container startups much faster. We also route requests to machines where the image is already cached as well as dedupe content between images in order to make startups faster

We are running on top of AWS however can run on top of any cloud provider as well as are working on you using your own cloud. Happy to hear more about your use case and see if we can help you at all - email me at michael@cerebrium.ai.

PS: I will state that vLLM has shocking load times into VRam that we are resolving.

za_mike157··on Show HN: A personalised AI tutor with < 1s voice responses
That is only for the data processing step that I run locally on my Mac to embed all his Youtube videos and upload to the VectorDB. Im not running Deepgram locally there
za_mike157··on Show HN: A personalised AI tutor with < 1s voice responses
Im glad! Keep pushing!
za_mike157··on Show HN: A personalised AI tutor with < 1s voice responses
Can you please elaborate on what you would like help with?

I linked all the code in the post so you can experiment with it yourself and even extend it. Also we are making use of the Pipecat framework (https://github.com/pipecat-ai/pipecat) which means you can swap in/out any STT, LLM or TTS model you would like to use:)

za_mike157··on Show HN: A personalised AI tutor with < 1s voice responses
This is a good suggestion! I will at it to the list of things that the community can do to extend
za_mike157··on Show HN: A personalised AI tutor with < 1s voice responses
We partnered with them and so its locally running their STT model on the container. You will see in the code we have a image reference which includes the Deepgram model
za_mike157··on Show HN: A personalised AI tutor with < 1s voice responses
Awesome! Let me know if you figure it out!

Yeah I got lazy with the "continue with lecture part" by doing fuzzy matching on the text. If you have an accent or its noisy its not that great. The more robust way to do it would be function calling

Page 1 of 2Next →