feat: prioritize proven GPU framework combinations
This commit is contained in:
36
README.md
36
README.md
@@ -48,26 +48,26 @@ Optional tuning:
|
||||
- `MODELHUB_MARKET_QUEUE_REFRESH_SECONDS` default `600`
|
||||
- `MODELHUB_MARKET_FRAMEWORK_REFRESH_SECONDS` default `21600`
|
||||
- `MODELHUB_MARKET_THROUGHPUT_WINDOW_HOURS` default `6`
|
||||
- `MODELHUB_MARKET_FRAMEWORK_MIN_SAMPLES` default `100`
|
||||
- `MODELHUB_MARKET_FRAMEWORK_MIN_SAMPLES` default `300`
|
||||
- `MODELSCOPE_PAGE_INTERVAL_SECONDS` default `0.25`
|
||||
- `MODELSCOPE_PAGE_CACHE_TTL_SECONDS` default `900`
|
||||
- `MODELHUB_AGENT_VERIFY_CACHE_TTL_SECONDS` default `900`
|
||||
|
||||
## Adaptive GPU Strategy
|
||||
|
||||
When no explicit GPU override is supplied, the worker uses a queue-aware 50/30/20
|
||||
strategy generation:
|
||||
When no explicit GPU override is supplied, the worker uses a success-first 70/30
|
||||
strategy generation with no self-funded exploration:
|
||||
|
||||
- 50%: the three long-term GPUs with the best Wilson lower confidence score and at least 100 terminal samples
|
||||
- 30%: exploration across every currently supported GPU
|
||||
- 20%: the top recent GPUs among the latest 1,000 terminal tasks
|
||||
- 70%: the three long-term GPUs with the best Wilson lower confidence score and at least 100 terminal samples
|
||||
- 30%: the top recent GPUs among the latest 1,000 terminal tasks
|
||||
- 0%: unvetted/all-GPU exploration; community-wide results provide the exploration signal
|
||||
|
||||
The 50/30/20 category ratio remains exact across accepted tasks. Inside each
|
||||
The 70/30 category ratio remains exact across accepted tasks. Inside each
|
||||
category, weighted fair scheduling combines the category's historical rank with
|
||||
live public market data:
|
||||
|
||||
- estimated backlog hours (`waiting / recent completions per hour`) instead of raw queue length
|
||||
- recent public success quality, scored with a Wilson lower confidence bound
|
||||
- recent public success quality, scored with a strongly weighted Wilson lower confidence bound
|
||||
- estimated backlog hours (`waiting / recent completions per hour`) as a bounded tie-breaker
|
||||
- machine availability, running workers, and advertised concurrency
|
||||
- a circuit breaker for unavailable or apparently stalled GPU pools
|
||||
|
||||
@@ -79,11 +79,12 @@ snapshot, uses a retry backoff, and never blocks normal submissions.
|
||||
For each compatible model/GPU pair, the worker also ranks the GPU's supported
|
||||
frameworks using ModelHub's public aggregate `modelCount` and `successCount` data,
|
||||
then blends in the worker's own GPU+framework outcomes with a capped weight.
|
||||
Only frameworks with at least 100 samples receive statistical priority; the
|
||||
legacy safe framework order remains the fallback. Framework statistics refresh
|
||||
Only frameworks with at least 300 public samples and a safe Wilson lower bound
|
||||
are eligible. Framework statistics refresh
|
||||
every 6 hours, so they do not add per-model API traffic. Newly published
|
||||
frameworks are discovered automatically, but receive no novelty bonus: they can
|
||||
win only when their confidence-adjusted success score is better. A new framework
|
||||
win only when their confidence-adjusted success score beats the best incumbent by
|
||||
at least 10%. A new framework
|
||||
is eligible only after the authenticated official build-config endpoint returns
|
||||
a complete config that passes local structure, placeholder, framework-name, and
|
||||
GPU-parallelism validation. Valid official configs are cached and refreshed with
|
||||
@@ -91,9 +92,14 @@ the framework snapshot; local templates remain the fail-safe fallback.
|
||||
|
||||
Only platform-accepted tasks count. After exactly 200 accepted tasks, the next
|
||||
poll cycle reloads all account history, generates a new immutable strategy snapshot,
|
||||
and resets the generation counters to 100/60/40 targets. The active snapshot and
|
||||
and resets the generation counters to 140/60 targets. The active snapshot and
|
||||
progress are stored in `.modelhub_state/gpu_strategy.json`.
|
||||
|
||||
Five consecutive local failures open a 12-hour GPU/framework circuit breaker.
|
||||
A sub-20% success rate over the latest 20 terminal tasks opens a 6-hour breaker.
|
||||
Candidate shortages expand the model search window; they never unlock an
|
||||
unvetted GPU or framework.
|
||||
|
||||
ModelScope HTTP 429 responses use exponential backoff and `Retry-After`. Successful
|
||||
pages remain cached, so a later cycle retries the failed page instead of restarting
|
||||
the whole pagination scan.
|
||||
@@ -139,6 +145,10 @@ adds fail-closed model/GPU prechecks and persistent uniqueness exclusions.
|
||||
Version `2026.08.04.1` adds queue/throughput intelligence, GPU health circuit
|
||||
breaking, weighted-fair scheduling, live framework/config discovery, and
|
||||
confidence-ranked public-plus-local framework selection.
|
||||
Version `2026.08.05.1` removes self-funded GPU exploration, switches accepted
|
||||
traffic to 70/30 long-term/recent exploitation, raises the public framework gate
|
||||
to 300 samples, makes success dominate queue pressure, and adds recent local
|
||||
GPU/framework circuit breakers.
|
||||
|
||||
## Deploy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user