读见

无服务器 GPU 的最佳 Beam Cloud 替代方案有哪些?

原题What are the best Beam Cloud alternatives for serverless GPUs?

约 9 分钟约 2,052 字原文英文已翻译

读前速览

5 个要点

本文详细比较了 Beam Cloud 的无服务器 GPU 替代方案——Nodus、Modal、RunPod、Baseten 和 Cerebrium,分析它们的定价差异、计费模式,并为寻求高性价比 GPU 算力的开发者提供使用场景建议。

  1. 对于 24 GB GPU、100 小时繁忙运行的场景,Nodus 是最具成本效益的无服务器 GPU 选项,费用为 $29.00,远低于相同配置下 Beam 的 $176.57。

    成本差异源于 Beam 将 GPU、CPU 和内存分开计费,而 Nodus 的小时费率包含整台机器的资源。Beam 的 RTX 4090 GPU 费用为 $0.69/hr,另需支付 $0.76 的 CPU 费用和 $0.32 的 RAM 费用,合计 $1.77/hr。

  2. Beam 适用于使用自定义代码的 HTTP 端点、整机 H100/H200/B200,以及在用户自有云账户中运行的场景。

    Beam 的 @endpoint 装饰器会将代码部署为 Web API,而 Nodus Functions 则可通过 Python 调用。与 Nodus 相比,Beam 的整机 H100($1.83/hr)、H200($2.09/hr)和 B200($4.11/hr)价格也更低。

  3. 冷启动表现因平台而异:Beam 不对容器启动时间收费,而 RunPod 从启动到停止的整个工作进程生命周期都会计费,其中包括模型加载时间。

    Beam 仅对应用代码加载时间收费;RunPod Serverless 则按工作进程的整个生命周期计费。Nodus 的冷启动时间较长,为 91-95 秒;而从快照恢复需要 16-17 秒,但没有公布固定数据。

  4. 保温设置会让无服务器端点产生持续运行的费用,因此对于始终在线的工作负载,小时费率比毫秒级计费更重要。

    一个工作进程连续运行 730 小时的月度成本,是繁忙时段小时费率的 730 倍:Beam 对应配置的费用为 $1,288.96,Nodus 则为 $211.70。因此,基础小时费率是始终在线工作负载的主要成本因素。

  5. 选择平台时,应依据具体配置的成本,以及端点的调用方式来判断。

    基于 Python 的突发型工作负载:Nodus。按秒计费的 HTTP 端点:RunPod Serverless。带免费额度的 Python 函数:Modal。专用部署:Baseten 或 Cerebrium。使用自定义代码的 HTTP 端点或大型 GPU:Beam。

完整摘要

本文比较了可替代 Beam Cloud 的无服务器 GPU 平台,重点分析定价、计费模式和实际使用场景。文章评估了 Nodus、Modal、RunPod Serverless、Baseten 和 Cerebrium 这 5 个平台,比较它们在 24 GB GPU、100 小时繁忙运行的工作负载下的成本。Nodus 的费用最低,为 $29.00;Beam 的 RTX 4090 配置则因 CPU 和内存单独计费而达到 $176.57。文章解释了为何 Beam 的端点定价较高,尽管其 GPU 费率较低;同时讨论了各平台的冷启动表现和保温设置。文章还比较了按需机器定价,指出 Beam 在整机 H100、H200 和 B200 方面更具优势,并支持在用户自有的云账户中运行。文章根据工作负载类型提供建议:基于 Python 的突发型工作负载选 Nodus;HTTP 端点选 RunPod;带免费额度的 Python 函数选 Modal;专用部署选 Baseten;使用自定义代码的 HTTP 端点或大型 GPU 机器选 Beam。

目录 · 13 节

查看原文

最好的 Beam Cloud 无服务器 GPU 替代方案包括 Nodus、Modal、RunPod Serverless、Baseten 和 Cerebrium;最便宜的方案取决于你使用的 GPU,以及处理程序所需的 CPU 和内存。Nodus 标出的 NVIDIA RTX 4090 价格为每小时 0.290 美元,因此繁忙运行 100 小时的费用为 29.00 美元;相比之下,Beam 的无服务器 RTX 4090(配备 4 个 vCPU 和 16 GiB 内存)费用为 176.57 美元。如果你需要为自己的代码提供 HTTP 端点、价格更低的整台 H100 和 H200 机器,或在自己的云账户中运行,Beam 仍是更好的选择。The best Beam Cloud alternatives for serverless GPUs are Nodus, Modal, RunPod Serverless, Baseten and Cerebrium, and the cheapest depends on your GPU and how much CPU and memory your handler needs. Nodus lists the NVIDIA RTX 4090 at $0.290 per hour, so 100 busy hours cost $29.00 there, against $176.57 on Beam's serverless RTX 4090 with 4 vCPU and 16 GiB. Beam stays the better pick for HTTP endpoints on your own code, lower-priced whole H100 and H200 machines, and running in your own cloud account.

我们开发 Nodus,因此请结合这一点来阅读本文。每条关于其他公司的信息都附有其定价页面或文档的链接,每项费用也都列明,方便你按今日价格重新计算。We build Nodus, so read this with that in mind. Every fact about another company links to its own pricing page or docs, and every cost is written out so you can redo it with today's prices.

Beam 的无服务器 GPU 实际上要花多少钱? What does Beam's serverless GPU actually cost?

Beam 的无服务器 GPU 产品线很精简,CPU 和内存费用则另行计收。其定价页面列出了两款无服务器 GPU:NVIDIA RTX 4090 24 GB,每小时 0.69 美元,可立即启动;RTX 5090 32 GB,每小时 1.09 美元,需承诺消费金额。代码运行期间按毫秒计费。Beam's serverless GPU line is short, and CPU and memory are billed on top of it. Its pricing page lists two serverless GPUs. The NVIDIA RTX 4090 24 GB is $0.69 per hour and starts right away; the RTX 5090 32 GB is $1.09 per hour with committed spend. Billing is by the millisecond while your code runs.

人们容易忽略的是附带的 CPU 和内存。Beam 对 GPU 附带的 CPU 和 RAM 收费分别为每 vCPU 小时 0.18972 美元、每 GiB 小时 0.0198 美元,所有套餐的费率都相同。以其自己的示例为例,一个配备 4 个 vCPU 和 16 GiB 内存的 RTX 4090 端点,每小时费用为 1.77 美元:GPU 费用 0.69 美元,CPU 费用 0.76 美元,RAM 费用 0.32 美元。The part people miss is the attached CPU and memory. Beam charges $0.18972 per vCPU-hour and $0.0198 per GiB-hour for CPU and RAM attached to a GPU, the same on every tier. Its own example, an RTX 4090 endpoint with 4 vCPU and 16 GiB, comes to $1.77 per hour: $0.69 for the GPU, $0.76 for CPU and $0.32 for RAM.

Beam 的 GPU 文档补充说明,SDK 接受的 GPU 名称“并不保证每种型号目前都可通过无服务器方式使用”,并提示你前往 beam machine list 查看实时可用情况。H100、H200 和 B200 等更高规格的显卡在 Beam 上以按需机器的形式提供,并按机器计价,而非作为无服务器 GPU 提供。Beam's GPU docs add that GPU names the SDK accepts are "not a promise that every model is currently available serverless", and point you to beam machine list for live availability. Bigger cards such as the H100, H200 and B200 appear on Beam as on-demand machines priced per machine, not as serverless GPUs.

主要的 Beam 替代方案之间有何区别? How do the main Beam alternatives compare?

各方案的差异在于计费项目,以及 24 GB 显卡每个繁忙小时的费用。此表采用各平台列出的最便宜的 24 GB 选项。The alternatives split by what they bill and what a 24 GB card costs per busy hour. This table uses each platform's cheapest listed 24 GB option.

Platform 24 GB option Listed rate CPU and RAM Billing unit
Beam RTX 4090 $0.69/hr GPU Extra: $0.18972/vCPU-hr, $0.0198/GiB-hr Millisecond
Nodus RTX 4090 $0.290/hr Offering rate covers the whole machine Live quote, frozen at start
RunPod Serverless (flex) L4, A5000, 3090 $0.75/hr Included Second, rounded up
RunPod Serverless (flex) RTX 4090 PRO $1.34/hr Included Second, rounded up
Baseten L4 $0.01414/min Per instance Minute
Cerebrium L4, 2 vCPU, 10 GB $0.000257/s Included in that example Second
Modal L4 $0.000222/s GPU Extra: $0.0000131/core-s, $0.00000222/GiB-s Second

价格核对日期:2026 年 11 月 21 日:Beam 定价、Nodus 定价、RunPod 定价和 RunPod Serverless 计费、Baseten 定价、Cerebrium 定价以及 Modal 定价。Nodus 的租用费率是实时报价,在获取容量时锁定;根据用量与成本指南,某个方案的小时费率适用于整台机器。Modal 将一个物理核心计为 2 个 vCPU。Prices checked November 21, 2026: Beam pricing, Nodus pricing, RunPod pricing and RunPod Serverless billing, Baseten pricing, Cerebrium pricing and Modal pricing. Nodus rented rates are live quotes that are frozen when capacity is acquired, and an offering's hourly rate applies to the whole machine, per the usage and costs guide. Modal counts one physical core as 2 vCPU.

这里另一个常见的平台是 Replicate。其定价页面按秒计费,但没有列出 24 GB 显卡:其 GPU 机型从 16 GB 的 NVIDIA T4(每小时 0.81 美元)起,另有 L40S(每小时 3.51 美元)。Replicate is the other common name here. Its pricing page bills per second, but it lists no 24 GB card: its GPUs start with an NVIDIA T4 16 GB at $0.81 per hour and an L40S at $3.51.

同一个端点在各个平台上的成本分别是多少? What does the same endpoint cost on each platform?

我们在所有平台上都对同一种工作负载进行了定价:一个部署在 24 GB GPU 上的推理端点,每月繁忙运行 100 小时,即 360,000 GPU 秒。对于 CPU 和内存单独计费的平台,我们采用了 Beam 自己提供的示例配置:4 个 vCPU 和 16 GiB。未计入空闲时间、存储和出站流量,以上均为标价。We priced one workload everywhere: an inference endpoint on a 24 GB GPU that is busy 100 hours a month, or 360,000 GPU-seconds. Where CPU and memory are billed separately, we used Beam's own example of 4 vCPU and 16 GiB. Idle time, storage and egress are left out, and these are list prices.

Platform and configuration Per busy hour 100 busy hours
Nodus, RTX 4090 $0.290 $29.00
RunPod Serverless flex, 24 GB tier $0.75 $75.00
Baseten, L4 $0.8484 $84.84
Cerebrium, L4 with 2 vCPU and 10 GB $0.9252 $92.52
Modal, L4 with 2 cores (4 vCPU) and 16 GiB $1.0214 $102.14
RunPod Serverless flex, RTX 4090 PRO $1.34 $134.00
Beam, RTX 4090 with 4 vCPU and 16 GiB $1.7657 $176.57

来源和核查日期与上文相同。Baseten 的费用为 $0.01414 x 6,000 分钟,Cerebrium 的费用为 $0.000257 x 360,000 秒。Modal 的费用为 ($0.000222 + 2 x $0.0000131 + 16 x $0.00000222) x 360,000 = $102.14。Beam 的费用为 ($0.69 + 4 x $0.18972 + 16 x $0.0198) x 100 = $176.57,Beam 将其四舍五入为每小时 $1.77。Same sources and check date as above. Baseten is $0.01414 x 6,000 minutes, and Cerebrium is $0.000257 x 360,000 seconds. Modal is ($0.000222 + 2 x $0.0000131 + 16 x $0.00000222) x 360,000 = $102.14. Beam is ($0.69 + 4 x $0.18972 + 16 x $0.0198) x 100 = $176.57, which Beam rounds to $1.77 per hour.

Cost of 100 busy hours on a 24 GB GPU at list prices on November 21, 2026: Nodus RTX 4090 $29.00, RunPod Serverless 24 GB tier $75.00, Baseten L4 $84.84, Cerebrium L4 $92.52, Modal L4 $102.14, RunPod Serverless RTX 4090 PRO $134.00 and Beam RTX 4090 with 4 vCPU and 16 GiB $176.57.
For the same 100 busy hours, Nodus is $147.57 cheaper than Beam's RTX 4090 with 4 vCPU and 16 GiB.

有两点需要说明,以确保比较公平。L4 的速度比 RTX 4090 慢,因此,在 RTX 4090 上运行所需时间的模型,使用 L4 时会占用更多运行时长。Nodus、RunPod 和 Baseten 的费率包含其服务套餐自带的 CPU 和内存配置,而这些配置并不一定正好是 4 个 vCPU 和 16 GiB。Two caveats keep this fair. The L4 is a slower card than the RTX 4090, so a model that needs the 4090's speed takes more busy hours on an L4. And the Nodus, RunPod and Baseten rates cover whatever CPU and memory the offering comes with, which is not exactly 4 vCPU and 16 GiB.

为什么 Beam 的 GPU 价格低,但端点价格高? Why is Beam's GPU price low but its endpoint price high?

因为在 4 vCPU、16 GiB 配置下,Beam GPU 所配套的 CPU 和内存成本高于 GPU 本身。在上面的示例中,100 小时的 GPU 费用为 $69.00,CPU 费用为 $75.89,RAM 费用为 $31.68。如果你的处理程序在 1 vCPU 和 4 GiB 内存下就能运行,那么在 Beam 上运行同样的 100 小时,费用就是 $69.00 + $18.97 + $7.92 = $95.89。Because CPU and memory attached to a Beam GPU cost more than the GPU in a 4 vCPU, 16 GiB setup. In the example above, 100 hours is $69.00 of GPU, $75.89 of CPU and $31.68 of RAM. If your handler fits in 1 vCPU and 4 GiB, the same 100 hours on Beam is $69.00 + $18.97 + $7.92 = $95.89.

Beam RTX 4090 cost for 100 busy hours at list prices on November 21, 2026: with 4 vCPU and 16 GiB it is $69.00 GPU, $75.89 CPU and $31.68 RAM, $176.57 in total; with 1 vCPU and 4 GiB it is $69.00 GPU, $18.97 CPU and $7.92 RAM, $95.89 in total.
Trimming CPU and memory nearly halves a Beam endpoint bill, so size them before you compare platforms.

所以,在迁移任何内容之前,先检查你的处理程序请求了哪些资源。我们的《什么是无服务器 GPU》指南介绍了无服务器账单中哪些部分会随着流量增加而增长。So before you move anything, check what your handler requests. Our what is a serverless GPU guide explains which parts of a serverless bill grow with traffic.

哪个 Beam 替代方案最擅长处理冷启动? Which Beam alternative handles cold starts best?

它们在将权重加载到全新的 GPU 上时都会耗费时间;区别在于它们对此如何收费。Beam 的定价常见问题解答称,启动服务器或加载容器映像不收费,只有加载应用程序代码才收费。其冷启动文档介绍了 checkpoint_enabled=True,可用于捕获初始化后的状态,但是否支持取决于运行时。All of them lose time loading weights onto a fresh GPU; they differ in what they bill for it. Beam's pricing FAQ says it does not charge for spinning up a server or loading your container image, only for loading your application code. Its cold start docs describe checkpoint_enabled=True for capturing initialized state, with support depending on the runtime.

根据其计费文档,RunPod 会从无服务器 worker 启动时开始计费,直到其停止为止,其中包括模型加载,但不包括镜像拉取或缓存模型下载。Cerebrium 的定价页面称,其容器可在 1 到 3 秒内扩容或缩容,并且内存和 GPU 快照可以更快地恢复工作负载。RunPod bills a Serverless worker from start until it stops, including model loading, but not image pulls or cached model downloads, per its billing docs. Cerebrium's pricing page says its containers scale up and down in 1 to 3 seconds and that memory and GPU snapshotting can restore workloads faster.

在 Nodus 上,GPU 快照目前处于 Beta 阶段。在 GPU 快照指南中,使用 NVIDIA A10 运行 Qwen3-0.6B 的 vLLM worker 从快照启动后,耗时 16.3 至 17.0 秒才返回结果;冷启动则耗时 91.5 至 95.5 秒。Nodus 未公布固定的冷启动耗时,因此如果首个请求的延迟对你很重要,请测试自己的模型。我们的最佳无服务器 GPU 平台指南会对更多平台进行这方面的比较。On Nodus, GPU snapshots are in Beta. In the GPU snapshots guide, a vLLM worker serving Qwen3-0.6B on an NVIDIA A10 answered 16.3 to 17.0 seconds after starting from a snapshot. A cold start took 91.5 to 95.5 seconds. Nodus publishes no fixed cold-start figure, so test your own model if first-request latency matters. Our best serverless GPU platforms guide compares this across more platforms.

保温设置会如何影响账单? How do keep-warm settings change the bill?

一个预热工作进程会让任何无服务器端点都变成持续计费的服务。Beam 的预热文档说明,keep_warm_seconds 会产生费用,而 min_containers=1 会让容器全天候运行。在 Nodus 上,根据扩缩容指南,min_workers 默认值为 0,scaledown_window 默认值为 1 分钟,最长可设为 20 分钟。A warm worker turns any serverless endpoint into an always-on bill. Beam's keep-warm docs say keep_warm_seconds is billable and min_containers=1 runs a container 24/7. On Nodus, min_workers defaults to 0 and scaledown_window to 1 minute, up to 20, per the scaling guide.

计算很简单:一个整月保持运行的 worker,按忙时费率计费,一个 730 小时的月份总费用就是忙时费率乘以 730。对于上面的 Beam 配置,费用为 730 × $1.7657 = $1,288.96;对于 Nodus 上的 RTX 4090,则为 730 × $0.290 = $211.70。对于整个月都保持运行的 worker 来说,每小时费率远比按毫秒计费重要。The math is simple: one warm worker for a 730-hour month costs 730 times the busy-hour rate. That is 730 x $1.7657 = $1,288.96 for the Beam configuration above, and 730 x $0.290 = $211.70 for an RTX 4090 on Nodus. For a worker that is warm all month, the hourly rate matters far more than millisecond billing.

有一点需要注意:Nodus Function 目前还不支持设置支出上限。Function 的支出控制说明,部署时会拒绝 max_cost,支出上限由你的信用额度余额决定,不过项目预算仍然适用。One gap to know: a Nodus Function does not take a spend cap yet. The Function spending controls say max_cost is refused at deploy and your credit balance is the limit, though project budgets still apply.

Beam 在哪里是更好的选择? Where is Beam the better choice?

在特定情况下,Beam 更具优势;对某些团队而言,这些优势足以抵消端点价格。Beam wins in specific cases, and for some teams they outweigh the endpoint price.

对于你自己的代码,公开的 HTTP 端点会更合适。根据 Beam 的快速入门指南,Beam 的 @endpoint 会部署为 Web API。Nodus Functions 通过 Python 中的 .remote()、.map() 或 .spawn() 调用,而 Nodus 目前提供的基础 URL 端点适用于通过 Inference(测试版)调用目录中的模型。It is better for public HTTP endpoints on your own code. A Beam @endpoint deploys as a web API, per its quickstart. Nodus Functions are called from Python with .remote(), .map() or .spawn(), and the base-URL endpoints Nodus offers today are for catalog models through Inference (Beta).

对于配备最新 GPU 的整台按需机器,Beam 更便宜。Beam 的定价页面列出了每台机器的统一价格,包含 CPU、RAM 和 NVMe:H100 PCIe 每小时 1.83 美元起,H200 为 2.09 美元,B200 为 4.11 美元。Nodus 的 H100 SXM 为 2.600 美元,H200 为 3.593 美元,B200 为 5.500 美元。A100 80GB(1.090 美元,对比 1.36 美元)和 RTX 4090(0.290 美元,对比 0.44 美元)方面,Nodus 更便宜;L40S 的价格则相近(0.793 美元,对比 0.76 美元)。It is cheaper for whole on-demand machines with the newest GPUs. Beam's pricing page lists one flat price per machine, including CPU, RAM and NVMe: an H100 PCIe from $1.83 per hour, an H200 from $2.09 and a B200 from $4.11. Nodus lists the H100 SXM at $2.600, the H200 at $3.593 and the B200 at $5.500. Nodus is lower on the A100 80GB ($1.090 against $1.36) and the RTX 4090 ($0.290 against $0.44), and the L40S is close ($0.793 against $0.76).

On-demand hourly rates on November 21, 2026, Beam against Nodus: H100 $1.83 against $2.600, H200 $2.09 against $3.593, B200 $4.11 against $5.500, A100 80GB $1.36 against $1.090 and L40S $0.76 against $0.793.
For a whole H100, H200 or B200 machine, Beam's starting price is lower than Nodus; for the A100 and RTX 4090, Nodus is lower.

Beam 自己的示例中,H100 机器运行 8 小时的费用为 $14.64。同样的 8 小时,在 Nodus H100 SXM 上要 $20.80;在 Modal 上则是 $0.001097 x 28,800 秒 = $31.59。Beam 的 H100 是 PCIe 卡,因此请确认你的作业不需要 SXM。Beam's own example puts 8 hours on an H100 machine at $14.64. The same 8 hours is $20.80 on a Nodus H100 SXM and $0.001097 x 28,800 seconds = $31.59 on Modal. Beam's H100 is a PCIe card, so check that your job does not need SXM.

它也可以运行在你自己的云环境中。Beam 的自带云选项可在你的 AWS、GCP 或 Azure 账户中管理工作负载。费用为每 vCPU 小时 0.019 美元、每 GB 小时 0.009 美元;使用 8 vCPU、32 GB 的 g5.2xlarge 实例时,每小时费用为 0.44 美元。Beam 不收取出站流量费,并提供自托管产品。It also runs in your own cloud. Beam's bring-your-own-cloud option manages work in your AWS, GCP or Azure account. The fee is $0.019 per vCPU-hour and $0.009 per GB-hour, or $0.44 per hour on an 8 vCPU, 32 GB g5.2xlarge. Beam charges no egress fees and offers a self-hosted product.

最后,根据 Beam 的介绍,它通过一个 CLI(并配有供编程智能体使用的 MCP 服务器)统一提供可在保留内存的情况下暂停的虚拟机、沙箱和无服务器 GPU。如果你日常使用这种智能体开发箱工作流,迁移的成本可能高于节省一个端点所带来的收益。Finally, Beam puts VMs that pause with memory intact, sandboxes and serverless GPUs behind one CLI with an MCP server for coding agents, per its introduction. If you live in that agent dev-box workflow, switching may cost more than an endpoint saves.

Beam 并不是可以连接到 Nodus 的云账户之一。支持的提供商列在云账户指南中。Beam is not one of the cloud accounts you can connect to Nodus. The supported providers are listed in the cloud accounts guide.

你应该选择哪种 Beam 替代方案? Which Beam alternative should you pick?

先根据你的具体配置在繁忙时段的价格进行选择(包括 CPU 和内存),然后再根据端点的调用方式进行选择。Pick by the busy-hour price of your exact configuration, including CPU and memory, and then by how the endpoint is called.

  • 你的处理程序运行在一张 24 GB 显卡上,流量呈突发性,后端通过 Python 调用它:Nodus。在我们的示例中,100 个繁忙小时的费用为 29.00 美元,而空闲工作进程会在 scaledown_window 后退出。
    Your handler runs on a 24 GB card, traffic is bursty, and your backend calls it from Python: Nodus. In our example it was $29.00 for 100 busy hours, and an idle worker leaves after its scaledown_window.
  • 如果你需要一个配备 16 GB 至 288 GB 无服务器 GPU、按秒计费的 HTTP 端点,可以选择 RunPod Serverless。我们的 RunPod 替代方案指南介绍了 RunPod 的其他产品。
    You need an HTTP endpoint with serverless GPUs from 16 GB to 288 GB and per-second billing: RunPod Serverless. Our RunPod alternatives guide covers its other products.
  • 如果你想使用以 Python 定义的函数,并享有每月免费额度,可以试试 Modal。它的 Starter 套餐每月包含 30 美元的免费额度。我们的 Modal 替代方案指南介绍了训练方面的选择。
    You want Python-defined functions with monthly free credits: Modal. Its Starter plan includes $30 a month of free credits. Our Modal alternatives guide covers the training side.
  • 需要按分钟计费的专用模型部署:Baseten。需要快速扩缩容并支持 GPU 快照:Cerebrium。
    You want dedicated model deployments billed per minute: Baseten. Fast scaling with GPU snapshotting: Cerebrium.
  • 你运行的是耗时较长的微调任务,而不是端点:在选择任何端点平台之前,请先了解用于训练的无服务器 GPU。
    You run long fine-tunes rather than endpoints: see serverless GPUs for training before choosing any endpoint platform.
  • 如果你需要为自己的代码提供 HTTP 端点、使用整台 H100 或 B200 机器,或在自己的 AWS、GCP 或 Azure 账户中工作,请继续使用 Beam。
    You need an HTTP endpoint on your own code, whole H100 or B200 machines, or work inside your own AWS, GCP or Azure account: stay on Beam.

我们是根据上面的示例推导出这条规则的。在做决定之前,请用你实际的 CPU 和内存重新计算高峰时段的负载。We wrote that rule from the worked examples above. Redo the busy-hour math with your real CPU and memory before deciding.

如何将 Beam 端点迁移到 Nodus? How do you move a Beam endpoint to Nodus?

将 Beam 的 on_start 加载器映射到 Nodus 的 @nodus.enter() 方法,并将其 keep_warm_seconds 映射到 scaledown_window。安装 SDK 并登录:Map Beam's on_start loader to a Nodus @nodus.enter() method and its keep_warm_seconds to scaledown_window. Install the SDK and sign in:

pip install nodus-compute
nodus login
Enter fullscreen mode Exit fullscreen mode

然后定义一个类,使其模型在每个工作进程中只加载一次。装饰器参数来自 Functions 和 classes 指南以及扩缩容指南;load_model() 代表你自己的加载器:Then define a class whose model loads once per worker. The decorator arguments come from the Functions and classes guide and the scaling guide; load_model() stands in for your own loader:

import nodus

app = nodus.App("classifier")


@app.cls(gpu="RTX 4090", min_workers=0, max_workers=10, scaledown_window="5m")
class Model:
    @nodus.enter()
    def load(self) -> None:
        self.model = load_model()

    @nodus.method()
    def predict(self, text: str) -> dict:
        return self.model(text)
Enter fullscreen mode Exit fullscreen mode

使用 `nodus deploy app.py` 部署它。设置 `min_workers=0` 后,空闲时会缩容至零;`scaledown_window="5m"` 与 Beam 的 `keep_warm_seconds=300` 相对应。在 App 内,`Model().predict.remote(text)` 可替代 HTTP 请求;Functions 指南介绍了另一个程序如何查找已部署的 App。Deploy it with nodus deploy app.py. With min_workers=0 it scales to zero when idle, and scaledown_window="5m" matches Beam's keep_warm_seconds=300. Inside the App, Model().predict.remote(text) replaces the HTTP request; the Functions guide shows how another program looks up a deployed App.

常见问题 FAQ

Beam 是开源的吗? Is Beam open source?

部分如此。Beam 在 GitHub 上以 AGPL-3.0 许可证发布 beta9,将其描述为用于无服务器 GPU 推理、沙箱和后台作业的工具。托管平台需另行计费。Partly. Beam publishes beta9 on GitHub under the AGPL-3.0 license, described as serverless GPU inference, sandboxes and background jobs. The hosted platform is billed separately.

你可以在这些平台上使用 AWS 或 GCP 的额度吗? Can you use AWS or GCP credits with these platforms?

在某些方面,Beam 的自带云选项会将计算费用计入你自己的 AWS、GCP 或 Azure 账户。Cerebrium 的定价常见问题说明,AWS 和 GCP 积分不能用于抵扣其服务用量。Nodus 可以在已连接的 AWS、GCP 或 Azure 账户中运行任务,并优先使用你的云积分;这是云账户指南中介绍的一项 Beta 功能。On some. Beam's bring-your-own-cloud option bills the compute to your own AWS, GCP or Azure account. Cerebrium's pricing FAQ says AWS and GCP credits cannot be applied to its usage. Nodus can run work in a connected AWS, GCP or Azure account and spend your cloud credits first, a Beta feature in the cloud accounts guide.

在 Beam 上你一次可以运行多少个 GPU? How many GPUs can you run at once on Beam?

这取决于套餐。Beam 的定价页面显示,每月 20 美元的 Developer 套餐可同时使用 5 个 GPU,并包含 20 美元的额度;每月 89 美元的 Team 套餐则可同时使用 50 个 GPU。在 Nodus 上,Function 的 max_workers 最高可设为 1,000,但需遵守你所在组织的配额。It depends on the plan. Beam's pricing page lists 5 concurrent GPUs on the $20-a-month Developer plan, which includes $20 of credits, and 50 on the $89-a-month Team plan. On Nodus, a Function's max_workers goes up to 1,000, within your org's quotas.

最初发表于 Nodus 博客。Originally published on the Nodus blog.

值得记下

  1. 无服务器 GPU 的最佳 Beam Cloud 替代方案包括 Nodus、Modal、RunPod Serverless、Baseten 和 Cerebrium;最便宜的选择取决于你使用的 GPU,以及处理程序需要多少 CPU 和内存。
  2. Nodus 标出的 NVIDIA RTX 4090 价格为每小时 $0.290,因此 100 小时繁忙运行的费用是 $29.00;而 Beam 的无服务器 RTX 4090 配置(配备 4 vCPU 和 16 GiB)则需要 $176.57。
  3. Beam 对 GPU 附带的 CPU 和 RAM 分别按每 vCPU 小时 $0.18972 和每 GiB 小时 $0.0198 收费,各档位的价格都相同。
  4. 在配备 4 vCPU、16 GiB 内存的配置中,Beam 的 GPU 附带 CPU 和内存费用高于 GPU 本身的费用。
  5. 请先根据具体配置的繁忙时段价格做出选择,将 CPU 和内存也纳入计算;然后再考虑端点的调用方式。