freesolo-flash-dev 0.2.25__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flash/__init__.py +29 -0
- flash/_channel.py +23 -0
- flash/_fileio.py +35 -0
- flash/_logging.py +49 -0
- flash/_update_check.py +266 -0
- flash/catalog.py +253 -0
- flash/cli/__init__.py +1 -0
- flash/cli/main/__init__.py +227 -0
- flash/cli/main/__main__.py +6 -0
- flash/cli/main/commands.py +636 -0
- flash/cli/main/envpush.py +317 -0
- flash/cli/main/render.py +599 -0
- flash/cli/main/training_doc.py +455 -0
- flash/client/__init__.py +14 -0
- flash/client/config.py +70 -0
- flash/client/http.py +372 -0
- flash/client/runtime_secrets.py +69 -0
- flash/client/specs.py +20 -0
- flash/cost/__init__.py +16 -0
- flash/cost/analytical.py +175 -0
- flash/cost/facts.py +114 -0
- flash/cost/spec.py +113 -0
- flash/cost/types.py +158 -0
- flash/engine/__init__.py +6 -0
- flash/engine/accounting.py +36 -0
- flash/engine/chalk_kernels.py +116 -0
- flash/engine/multiturn_rollout.py +780 -0
- flash/engine/recipe.py +86 -0
- flash/engine/vram.py +603 -0
- flash/engine/worker/__init__.py +2916 -0
- flash/engine/worker/__main__.py +4 -0
- flash/engine/worker/kernel_warmup.py +400 -0
- flash/engine/worker/lora.py +796 -0
- flash/engine/worker/packing.py +366 -0
- flash/engine/worker/perf.py +1048 -0
- flash/envs/__init__.py +10 -0
- flash/envs/adapter/__init__.py +883 -0
- flash/envs/adapter/rubric.py +222 -0
- flash/envs/base.py +52 -0
- flash/envs/registry.py +62 -0
- flash/mcp/__init__.py +1 -0
- flash/mcp/server.py +85 -0
- flash/providers/__init__.py +59 -0
- flash/providers/_auth.py +24 -0
- flash/providers/_http.py +230 -0
- flash/providers/_instance.py +416 -0
- flash/providers/_instance_bootstrap.py +517 -0
- flash/providers/_poll.py +311 -0
- flash/providers/allocator.py +193 -0
- flash/providers/base.py +431 -0
- flash/providers/hyperstack/__init__.py +127 -0
- flash/providers/hyperstack/api.py +522 -0
- flash/providers/hyperstack/auth.py +17 -0
- flash/providers/hyperstack/gpus.py +29 -0
- flash/providers/hyperstack/jobs/__init__.py +632 -0
- flash/providers/hyperstack/jobs/builders.py +122 -0
- flash/providers/hyperstack/preflight.py +23 -0
- flash/providers/hyperstack/pricing.py +26 -0
- flash/providers/hyperstack/train.py +25 -0
- flash/providers/lambdalabs/__init__.py +139 -0
- flash/providers/lambdalabs/api.py +261 -0
- flash/providers/lambdalabs/auth.py +18 -0
- flash/providers/lambdalabs/gpus.py +29 -0
- flash/providers/lambdalabs/jobs/__init__.py +724 -0
- flash/providers/lambdalabs/jobs/builders.py +118 -0
- flash/providers/lambdalabs/preflight.py +27 -0
- flash/providers/lambdalabs/pricing.py +51 -0
- flash/providers/lambdalabs/train.py +27 -0
- flash/providers/preflight.py +55 -0
- flash/providers/realized.py +80 -0
- flash/providers/runpod/__init__.py +130 -0
- flash/providers/runpod/api.py +186 -0
- flash/providers/runpod/auth.py +37 -0
- flash/providers/runpod/cost.py +57 -0
- flash/providers/runpod/gpus.py +46 -0
- flash/providers/runpod/jobs.py +956 -0
- flash/providers/runpod/keys.py +139 -0
- flash/providers/runpod/preflight.py +30 -0
- flash/providers/runpod/preload.py +915 -0
- flash/providers/runpod/pricing.py +18 -0
- flash/providers/runpod/slots.py +79 -0
- flash/providers/runpod/train/__init__.py +150 -0
- flash/providers/runpod/train/deps.py +395 -0
- flash/providers/runpod/train/endpoints.py +820 -0
- flash/py.typed +0 -0
- flash/runner/__init__.py +686 -0
- flash/runner/checkpoints.py +82 -0
- flash/runner/deploy.py +422 -0
- flash/runner/lifecycle.py +672 -0
- flash/schema/__init__.py +375 -0
- flash/schema/fields.py +331 -0
- flash/serve/__init__.py +1 -0
- flash/serve/deploy.py +326 -0
- flash/serve/pricing.py +60 -0
- flash/server/__init__.py +1 -0
- flash/server/__main__.py +20 -0
- flash/server/app.py +961 -0
- flash/server/auth.py +263 -0
- flash/server/billing.py +124 -0
- flash/server/checkpoints.py +110 -0
- flash/server/db.py +160 -0
- flash/server/environment_registry.py +102 -0
- flash/server/envs.py +360 -0
- flash/server/reconcile.py +163 -0
- flash/server/run_registry.py +150 -0
- flash/spec.py +333 -0
- freesolo_flash_dev-0.2.25.dist-info/METADATA +192 -0
- freesolo_flash_dev-0.2.25.dist-info/RECORD +111 -0
- freesolo_flash_dev-0.2.25.dist-info/WHEEL +4 -0
- freesolo_flash_dev-0.2.25.dist-info/entry_points.txt +3 -0
- freesolo_flash_dev-0.2.25.dist-info/licenses/LICENSE +201 -0
flash/serve/pricing.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Serving token prices for Flash deployments.
|
|
2
|
+
|
|
3
|
+
Prices are listed per 1M tokens. Flash bills the base model serverless list price
|
|
4
|
+
plus the fixed serving markup.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from dataclasses import dataclass
|
|
10
|
+
|
|
11
|
+
from flash.catalog import MODELS
|
|
12
|
+
|
|
13
|
+
SERVING_MARKUP = 1.20
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@dataclass(frozen=True)
|
|
17
|
+
class ServingPrice:
|
|
18
|
+
model_id: str
|
|
19
|
+
base_input_usd_per_mtok: float
|
|
20
|
+
base_output_usd_per_mtok: float
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def billed_input_usd_per_mtok(self) -> float:
|
|
24
|
+
return self.base_input_usd_per_mtok * SERVING_MARKUP
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def billed_output_usd_per_mtok(self) -> float:
|
|
28
|
+
return self.base_output_usd_per_mtok * SERVING_MARKUP
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
SERVING_PRICES: dict[str, ServingPrice] = {
|
|
32
|
+
"openbmb/MiniCPM5-1B": ServingPrice("openbmb/MiniCPM5-1B", 0.05, 0.10),
|
|
33
|
+
"Qwen/Qwen3.5-0.8B": ServingPrice("Qwen/Qwen3.5-0.8B", 0.05, 0.10),
|
|
34
|
+
"Qwen/Qwen3.5-2B": ServingPrice("Qwen/Qwen3.5-2B", 0.10, 0.20),
|
|
35
|
+
"Qwen/Qwen3.5-4B": ServingPrice("Qwen/Qwen3.5-4B", 0.20, 0.40),
|
|
36
|
+
"Qwen/Qwen3.5-9B": ServingPrice("Qwen/Qwen3.5-9B", 0.50, 1.00),
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def serving_price(model_id: str) -> ServingPrice:
|
|
41
|
+
try:
|
|
42
|
+
return SERVING_PRICES[model_id]
|
|
43
|
+
except KeyError as exc:
|
|
44
|
+
raise ValueError(f"unknown serving model {model_id!r}") from exc
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def serving_price_rows() -> list[dict[str, float | str]]:
|
|
48
|
+
rows: list[dict[str, float | str]] = []
|
|
49
|
+
for model_id in sorted(MODELS):
|
|
50
|
+
price = serving_price(model_id)
|
|
51
|
+
rows.append(
|
|
52
|
+
{
|
|
53
|
+
"model_id": model_id,
|
|
54
|
+
"base_input_usd_per_mtok": price.base_input_usd_per_mtok,
|
|
55
|
+
"base_output_usd_per_mtok": price.base_output_usd_per_mtok,
|
|
56
|
+
"billed_input_usd_per_mtok": price.billed_input_usd_per_mtok,
|
|
57
|
+
"billed_output_usd_per_mtok": price.billed_output_usd_per_mtok,
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
return rows
|
flash/server/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Control-plane API package."""
|
flash/server/__main__.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""`python -m flash.server` — run the managed control plane."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
|
|
7
|
+
from .app import run_server
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main(argv: list[str] | None = None) -> int:
|
|
11
|
+
parser = argparse.ArgumentParser(prog="flash.server", description="Flash control plane")
|
|
12
|
+
parser.add_argument("--host", default="127.0.0.1")
|
|
13
|
+
parser.add_argument("--port", type=int, default=8080)
|
|
14
|
+
args = parser.parse_args(argv)
|
|
15
|
+
run_server(host=args.host, port=args.port)
|
|
16
|
+
return 0
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
if __name__ == "__main__":
|
|
20
|
+
raise SystemExit(main())
|