Skip to main content

Cost Projection

@webframp/cost-projectionv2026.08.01.1· 1d agoMODELSREPORTS
01README

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-comparison

Per-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.

02Release Notes

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
03Models3
@webframp/cost-projection/gpu-cloudv2026.08.01.1cost-projection/gpu_cloud.ts
fn record(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)
Record a cloud GPU inference scenario and compute its projection.
ArgumentTypeDescription
namestring
regionstring
instanceTypestring
gpuCountnumber
gpuModelstring
commitmentTermMonths?number
instanceRatePerHournumber
currencystring
hoursPerDaynumber
daysPerMonthnumber
replicasnumber
storageGbnumber
storageRatePerGbMonthnumber
dataTransferGbMonthnumber
dataTransferRatePerGbnumber
managementFeePerMonthnumber
apiComparisonRatePerMToken?number
estimatedTokensPerGpuHour?number
notes?string
sourceUrl?string
quotedAt?string
fn project()
Re-compute the projection from the stored scenario. Use after
fn update_rate(instanceRatePerHour: number, quotedAt?: string)
Update the instance hourly rate and quotedAt timestamp without
ArgumentTypeDescription
instanceRatePerHournumber
quotedAt?string

Resources

scenario(infinite)— Cloud GPU inference scenario — instance type, capacity model,
projection(infinite)— Computed cost projection normalized to $/GPU-hour. Derived from
@webframp/cost-projection/gpu-rentalv2026.08.01.1cost-projection/gpu_rental.ts
fn record(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)
Record a GPU rental scenario and compute its projection.
ArgumentTypeDescription
namestring
providerstring
region?string
gpuModelstring
gpuCountnumber
gpuMemoryGb?number
ratePerGpuHournumber
currencystring
commitmentDiscountPctnumber
hoursPerDaynumber
daysPerMonthnumber
storageGbnumber
storageRatePerGbMonthnumber
networkEgressGbMonthnumber
networkEgressRatePerGbnumber
apiComparisonRatePerMToken?number
estimatedTokensPerGpuHour?number
notes?string
sourceUrl?string
quotedAt?string
fn project()
Re-compute the projection from the stored scenario. Use after
fn update_rate(ratePerGpuHour: number, quotedAt?: string)
Update the per-GPU hourly rate and quotedAt without re-entering
ArgumentTypeDescription
ratePerGpuHournumber
quotedAt?string

Resources

scenario(infinite)— GPU rental inference scenario — provider, GPU type, hourly rate,
projection(infinite)— Computed cost projection normalized to $/GPU-hour. Derived from
@webframp/cost-projection/gpu-capexv2026.08.01.1cost-projection/gpu_capex.ts
fn record(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)
Record a capex GPU inference scenario and compute its projection.
ArgumentTypeDescription
namestring
site?string
gpuModelstring
gpuCountnumber
gpuCostPerUnitnumber
serverCostnumber
networkingCostnumber
totalHardwareCostnumber
usefulLifeMonthsnumber
residualValuePctnumber
coloCostPerKwMonthnumber
powerDrawKwnumber
puenumber
networkBandwidthCostPerMonthnumber
staffFteAllocationnumber
staffCostPerFteMonthnumber
failureRatePctPerYearnumber
spareBudgetPerMonthnumber
warrantyMonthsnumber
targetUtilizationPctnumber
hoursPerDaynumber
daysPerMonthnumber
apiComparisonRatePerMToken?number
estimatedTokensPerGpuHour?number
currencystring
notes?string
quotedAt?string
fn project()
Re-compute the projection from the stored scenario.
fn update_hardware_cost(totalHardwareCost: number, gpuCostPerUnit?: number, quotedAt?: string)
Revise the total hardware cost (e.g. after a new vendor quote)
ArgumentTypeDescription
totalHardwareCostnumber
gpuCostPerUnit?number
quotedAt?string
fn sensitivity()
Run the projection across a matrix of utilization and useful-life

Resources

scenario(infinite)— Capex GPU inference scenario — hardware costs, amortization
projection(infinite)— Computed cost projection with amortized hardware normalized to
sensitivity(infinite)— Sensitivity matrix showing $/GPU-hour across multiple utilization
04Reports1
@webframp/cost-projection-comparisonworkspace
scenario_comparison.ts

Cross-scenario GPU inference cost comparison, normalized to $/GPU-hour.

gpucostprojectioncomparisonfinops
05Stats
A
100 / 100
Downloads
0
Archive size
17.4 KB
  • 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
06Platforms
07Labels