Cost Projection
GPU inference cost projection across cloud, rental, and capex scenarios.
Three model types store scenario inputs (instance rates, hardware costs, facility expenses) and compute normalized $/GPU-hour projections. A comparison report queries all scenarios and produces a ranked table with crossover analysis.
No live API calls — rates are manually entered from quotes, pricing pages, or account team conversations. All scenarios in a comparison must share a currency.
Model Types
- gpu-cloud — Hyperscaler GPU instances (AWS, Azure, GCP) under various capacity models: on-demand, reserved, FTP, Capacity Blocks, etc.
- gpu-rental — Third-party providers (CoreWeave, Lambda Labs, RunPod) with simpler per-GPU-hour pricing and optional commitment discounts.
- gpu-capex — On-premises/colo hardware. Amortizes a capital purchase into synthetic recurring cost, adds facility/staff/maintenance, and normalizes to $/GPU-hour. Includes sensitivity analysis across utilization and useful-life assumptions.
Usage
swamp extension pull @webframp/cost-projection
# Cloud scenario
swamp model create @webframp/cost-projection/gpu-cloud kimi-k3-hyperpod
swamp model method run kimi-k3-hyperpod record \
--input name=kimi-k3-hyperpod \
--input provider=aws \
--input region=us-east-1 \
--input instanceType=ml.p6-b300.48xlarge \
--input gpuCount=8 \
--input gpuModel="NVIDIA B300" \
--input capacityModel=flexible-training-plan \
--input instanceRatePerHour=98.50
# Rental scenario
swamp model create @webframp/cost-projection/gpu-rental kimi-k3-coreweave
swamp model method run kimi-k3-coreweave record \
--input name=kimi-k3-coreweave \
--input provider=coreweave \
--input gpuModel="NVIDIA H100 SXM" \
--input gpuCount=8 \
--input ratePerGpuHour=2.49
# Capex scenario
swamp model create @webframp/cost-projection/gpu-capex dc-east-b300
swamp model method run dc-east-b300 record \
--input name=dc-east-b300 \
--input gpuModel="NVIDIA B300" \
--input gpuCount=8 \
--input gpuCostPerUnit=35000 \
--input serverCost=45000 \
--input networkingCost=15000 \
--input totalHardwareCost=340000 \
--input usefulLifeMonths=36 \
--input coloCostPerKwMonth=150 \
--input powerDrawKw=10.5
# Run sensitivity analysis
swamp model method run dc-east-b300 sensitivity
# Compare all scenarios
swamp report run webframp/cost-projection-comparisonPer-Token Break-Even (Optional)
To compare self-hosted cost against per-token API pricing, provide
apiComparisonRatePerMToken ($/million tokens from the API provider) and
estimatedTokensPerGpuHour (from vLLM benchmarks or model card throughput
figures) when recording a scenario. The projection will compute the monthly
token volume at which self-hosting breaks even.
Release Notes
2026.08.01.1
Fixed: Report name now uses collective prefix (@webframp/cost-projection-comparison).
Previous name (webframp/cost-projection-comparison) failed publish validation.
2026.07.31.1
Initial release.
- Three model types:
gpu-cloud,gpu-rental,gpu-capex - All normalize to $/GPU-hour for cross-scenario comparison
- Capex model includes sensitivity analysis (utilization × useful-life matrix)
- Workspace-scoped comparison report with crossover analysis
- Single-currency assumption (all scenarios must share a currency)
- Optional per-token break-even calculation against API pricing
| Argument | Type | Description |
|---|---|---|
| name | string | |
| region | string | |
| instanceType | string | |
| gpuCount | number | |
| gpuModel | string | |
| commitmentTermMonths? | number | |
| instanceRatePerHour | number | |
| currency | string | |
| hoursPerDay | number | |
| daysPerMonth | number | |
| replicas | number | |
| storageGb | number | |
| storageRatePerGbMonth | number | |
| dataTransferGbMonth | number | |
| dataTransferRatePerGb | number | |
| managementFeePerMonth | number | |
| apiComparisonRatePerMToken? | number | |
| estimatedTokensPerGpuHour? | number | |
| notes? | string | |
| sourceUrl? | string | |
| quotedAt? | string |
| Argument | Type | Description |
|---|---|---|
| instanceRatePerHour | number | |
| quotedAt? | string |
Resources
| Argument | Type | Description |
|---|---|---|
| name | string | |
| provider | string | |
| region? | string | |
| gpuModel | string | |
| gpuCount | number | |
| gpuMemoryGb? | number | |
| ratePerGpuHour | number | |
| currency | string | |
| commitmentDiscountPct | number | |
| hoursPerDay | number | |
| daysPerMonth | number | |
| storageGb | number | |
| storageRatePerGbMonth | number | |
| networkEgressGbMonth | number | |
| networkEgressRatePerGb | number | |
| apiComparisonRatePerMToken? | number | |
| estimatedTokensPerGpuHour? | number | |
| notes? | string | |
| sourceUrl? | string | |
| quotedAt? | string |
| Argument | Type | Description |
|---|---|---|
| ratePerGpuHour | number | |
| quotedAt? | string |
Resources
| Argument | Type | Description |
|---|---|---|
| name | string | |
| site? | string | |
| gpuModel | string | |
| gpuCount | number | |
| gpuCostPerUnit | number | |
| serverCost | number | |
| networkingCost | number | |
| totalHardwareCost | number | |
| usefulLifeMonths | number | |
| residualValuePct | number | |
| coloCostPerKwMonth | number | |
| powerDrawKw | number | |
| pue | number | |
| networkBandwidthCostPerMonth | number | |
| staffFteAllocation | number | |
| staffCostPerFteMonth | number | |
| failureRatePctPerYear | number | |
| spareBudgetPerMonth | number | |
| warrantyMonths | number | |
| targetUtilizationPct | number | |
| hoursPerDay | number | |
| daysPerMonth | number | |
| apiComparisonRatePerMToken? | number | |
| estimatedTokensPerGpuHour? | number | |
| currency | string | |
| notes? | string | |
| quotedAt? | string |
| Argument | Type | Description |
|---|---|---|
| totalHardwareCost | number | |
| gpuCostPerUnit? | number | |
| quotedAt? | string |
Resources
Cross-scenario GPU inference cost comparison, normalized to $/GPU-hour.
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned