Live data from Hacker News

Ask HN: What do you use for ML Hosting?

news.ycombinator.com

11–20 of 69 posts

Re: Ask HN: What do you use for ML Hosting?

#11
post #3

I'm currently running a Discord bot with a 7B model off a free Oracle Ampere instance with their Pytorch Accelerated[0] image. It's not terribly fast, but totally usable for group chats that want to interrogate an AI. If you're doing some sort of offline processing or non-time-imperative operation, something like this might be worth looking into. [0] https://cloudmarketplace.oracle.com/marketplace/en_US/adf.ta...

Oracles free forever tier is so underrated. They just throw half a startup at you at no cost.

Re: Ask HN: What do you use for ML Hosting?

#17
Try www.salad.com. We've got 10k+ GPUs - from 8GB to 24GB. You get 10x more inferences per dollar compared to others. Our product team is pretty happy to help out on Discord. Some prices of interest. RTX 3060 - 12 GB - $0.08/hr RTX 3090 - 24 GB - $0.25/hr

Re: Ask HN: What do you use for ML Hosting?

#18
On Modal.com these 34 lines of code is all you need to serverlessly run BERT text generation inference on an A10G (which has 24GB of GPU memory). No Dockerfile, no YAML, no Terraform or AWS Cloudformation. Just these 34 lines.

  import modal

  def download_model():
      from transformers import pipeline
      pipeline("fill-mask", model="bert-base-uncased")

  CACHE_PATH = "/root/model_cache"  # model location in image
  ENV = modal.Secret({"TRANSFORMERS_CACHE": CACHE_PATH})

  image = (
      modal.Image.debian_slim()
      .pip_install("torch", "transformers")
      .run_function(download_model, secret=ENV)
  )
  stub = modal.Stub(name="hn-demo", image=image)


  class Model:
      def __enter__(self):
          from transformers import pipeline
          self.model = pipeline("fill-mask", model="bert-base-uncased", device=0)

      @stub.function(
          gpu="a10g",
          secret=ENV,
      )
      def handler(self, prompt: str):
          return self.model(prompt)


  if __name__ == "__main__":
      with stub.run():
          prompt = "Hello World! I am a [MASK] machine learning model."
          print(Model().handler.call(prompt)[0]["sequence"])

Running `python hn_demo.py` prints "Hello World! I am a simple machine learning model."

You can check out available GPUs at https://modal.com/docs/reference/modal.gpu.

There's also a bunch of easy-to-run examples in our docs :) https://modal.com/docs/guide/ex/stable_diffusion_cli

Re: Ask HN: What do you use for ML Hosting?

#19

Hey! Would love to have you try https://banana.dev (bias: I'm one of the founders). We run A100s for you and scale 0->1->n->0 on demand, so you only pay for what you use. I'm at erik@banana.dev if you want any help with it :)

Looking at your pricing, is that per seconds of GPU usage or per total seconds the app is running?

Eg. might have only a few minutes of usage in an hour and the rest of the time is spent waiting for requests. How's that billed?

Re: Ask HN: What do you use for ML Hosting?

#20
post #2

For serverless: check the list I posted here https://news.ycombinator.com/item?id=34742087 (I ended up using Banana, it was fine) For non-serverless, some to check out are these (though likely all overkill if you just need a single GPU) https://www.coreweave.com/ vast.ai Lambda labs

How come you didn't end up using Modal, seeing at it was recommended in the only reply in the thread? [I'm a Modal person looking for insight :)]
Post reply on HN