# Wat geeft het meest redelijke resultaat: CPU of RAM?

**URL:** <https://meta.discourse.org/t/what-gives-the-most-resonable-result-cpu-or-ram/263240>\
**Category:** Self-hosting\
**Tags:** ai\
**Created:** [29 april 2023 om 09:49 UTC](https://meta.discourse.org/t/what-gives-the-most-resonable-result-cpu-or-ram/263240 "2023-04-29T09:49:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [29 april 2023 om 16:10 UTC](https://meta.discourse.org/t/what-gives-the-most-resonable-result-cpu-or-ram/263240/2 "2023-04-29T16:10:49Z")

</div>

> [@Jagster](#):
>
> what are the minimum costs if one wants for example _Suggested topics_ block?

The main problem with the AI “Related Topics” thing is that you have to generate embeddings for all your existing topics. In large forums that takes a while, and is the “expensive” part of the operation. However, you only need to run this once, so you can leverage hourly instances to pay just the bare minimum here.

Generating embeddings for Meta took me around 1h. So you can, for example, get [a VPS with a full NVIDIA A100 for one hour](https://www.vultr.com/pricing/#cloud-gpu) to run it and pay less than $3 for it!

After you have all those embeddings already generated, you only need to generate new ones for new and edited topics, and there you can probably fly with CPU-based inference.

So let’s say you now have:

1. One droplet at Digital Ocean running Discourse

During the backfill you can have:

1. One droplet at Digital Ocean running Discourse
2. One droplet at Digital Ocean running PostgreSQL for storing the embeddings
3. One VPS at Vultr for computing embeddings fast

After the backfill you change it to:

1. One droplet at Digital Ocean running Discourse
2. One droplet at Digital Ocean running PostgreSQL for storing the embeddings **and now also** the embeddings service

As for the droplet size for the 2, a small one with 4GB RAM may be enough, gotta double check how much RAM that embeddings service container is using.

---

_[View the full topic](https://meta.discourse.org/t/what-gives-the-most-resonable-result-cpu-or-ram/263240)._
