new tasks, model pricing, auto quantisation, etc...
This commit is contained in:
@@ -52,6 +52,7 @@ def _max_assignable_layers(memory_mb: int, total_layers: int | None) -> int:
|
||||
def _shard_budget_line(memory_mb: int, memory_source: str, total_layers: int | None, quantization: str) -> str:
|
||||
memory_gb = memory_mb / 1024
|
||||
gb_str = f"{memory_gb:.1f} GB"
|
||||
budget_quantization = "bfloat16" if quantization == "auto" else quantization
|
||||
if total_layers is None or total_layers <= 0:
|
||||
return f"Memory budget: {gb_str} {memory_source}; shard budget: unknown model layer count"
|
||||
max_layers = _max_assignable_layers(memory_mb, total_layers)
|
||||
@@ -61,7 +62,7 @@ def _shard_budget_line(memory_mb: int, memory_source: str, total_layers: int | N
|
||||
remaining_str = f"; {remaining_gb:.1f} GB remaining after full load" if remaining_gb > 1 else ""
|
||||
return (
|
||||
f"Memory budget: {gb_str} {memory_source}; "
|
||||
f"Shard budget: up to {max_layers}/{total_layers} layers at {quantization}"
|
||||
f"Shard budget: up to {max_layers}/{total_layers} layers at {budget_quantization}"
|
||||
f"{remaining_str}"
|
||||
)
|
||||
|
||||
@@ -306,7 +307,7 @@ def run_startup(
|
||||
model_id: str | None = None,
|
||||
shard_start: int | None = None,
|
||||
shard_end: int | None = None,
|
||||
quantization: str = "bfloat16",
|
||||
quantization: str = "auto",
|
||||
wallet_path: Path | None = None,
|
||||
cache_dir: Path | None = None,
|
||||
host: str = "127.0.0.1",
|
||||
|
||||
Reference in New Issue
Block a user