[Feature]: External / heterogeneous scheduling hooks and richer placement signals
维护者通常 5 天内回复
@sherief-nv 已经在做这个了。
开始于 2026年10月9日。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- go
调研方向
该 issue 未指出实现文件或入口点;首先定位 routing 和 scheduling 代码以及现有的 integration tests。在进行任何更改之前,将提案拆分为范围明确的能力。完成要求包括保留 native fallback 行为、隔离并发 request hints、强制执行 trust 和 eligibility 检查,并通过列出的 heterogeneous-cluster scenarios 验证 placement 和 telemetry。
由索引模型根据 Issue 内容生成。
描述
Area
Routing and scheduling
User problem
PAIR provides a strong transport, discovery, and inference data plane for distributed local inference, but heterogeneous clusters need richer placement signals than model ownership, queue depth, and coarse GPU utilization alone.
Today, an external scheduler cannot safely influence placement for one request without changing a persistent or proxy-wide pin, which can introduce races under concurrent traffic. Nodes that own the same model can also have very different practical runtime envelopes: characterized context limits, memory requirements, full-GPU versus CPU/offload behavior, model-load time, prompt/generation throughput, and reliability.
Requests themselves vary substantially in cost based on prompt length, requested context, expected output, model size, and modality. PAIR also has useful model-state visibility, but warm-model affinity and host-wide pressure from other compute workloads are not fully represented in routing decisions. Finally, operators need explainable placement metadata without exposing prompt content.
Desired outcome
PAIR should optionally support the following while preserving its native distributed scheduler as the self-contained default and fallback:
- Request-scoped placement hints such as a preferred node or ranked candidate list. PAIR would continue to enforce model ownership, availability, trust, and normal safety checks.
- Per-model/per-node runtime profiles learned empirically, including characterized context sizes, VRAM/RAM requirements, GPU/offload behavior, load time, prompt TPS, generation TPS, and stability history.
- Weighted request-cost estimation using inputs such as prompt tokens, requested context, expected output length, model size, modality, and historical model/node cost.
- Warm-model affinity when a suitable model is already resident and resource pressure does not favor another node.
- An optional external placement-authority hook, with automatic fallback to PAIR's native scheduler if that authority is unavailable.
- Host-wide admission signals so external GPU/CPU/memory pressure can influence placement without PAIR needing to manage those workloads.
- Explainable routing telemetry showing candidates, exclusions, selected node, selection reason, and failovers, without logging prompt content.
- Optional telemetry hardening under the same cluster trust/mTLS model used by other PAIR services.
The observable result would be safer and more predictable scheduling across heterogeneous nodes, lower model load/unload churn and tail latency, and easier integration with higher-level orchestration systems while PAIR remains the inference transport and failover layer.
Guidottavio D’Assisti
[email protected]
Alternatives considered
- Continue using PAIR's native scheduler based primarily on queued/running workload and GPU pressure. This remains a valuable default and fallback, but it cannot distinguish requests or model/node combinations with radically different practical costs.
- Use the existing manual node pin. A persistent or proxy-wide pin is not sufficient for concurrent, per-request placement and may create global-state races.
- Route directly to inference engines from an external orchestrator. This would duplicate PAIR's model eligibility, discovery, mTLS transport, streaming, and failover responsibilities.
- Infer capacity only from hardware specifications. Empirically learned runtime envelopes are more representative of real behavior across models, contexts, backends, and offload modes.
Compatibility and security implications
All proposed capabilities should be optional and backward-compatible. Requests without placement hints should retain current routing behavior, and an unavailable external authority should fall back to PAIR's native scheduler.
Placement hints must remain advisory to PAIR's eligibility, availability, and trust checks; they must not bypass model ownership, pairing, mTLS, or failover safety. Unknown or unauthorized node identifiers should be rejected or ignored according to a documented policy.
Routing telemetry should exclude prompt and response content and avoid exposing unnecessary host details. If telemetry protection is extended, existing trusted-local deployments should have a documented migration path. API extensions should use optional headers or namespaced fields so existing OpenAI- and Ollama-compatible clients continue to work unchanged.
Validation approach
Maintainers could validate the outcome with automated integration tests covering:
- a request-scoped preferred node being selected only when it is reachable, trusted, and owns the requested model;
- deterministic fallback when the preferred node or external authority is unavailable;
- concurrent requests carrying different placement hints without cross-request interference;
- ranking changes driven by distinct model/node runtime profiles, weighted request costs, and warm-model state;
- host-wide admission signals excluding a pressured node and recovering when pressure clears;
- OpenAI- and Ollama-compatible requests without new hints preserving existing behavior;
- routing telemetry explaining candidates, exclusions, selection, and failovers while containing no prompt/response content;
- unauthorized or malformed hints failing safely and telemetry endpoints enforcing the configured trust model.
A small heterogeneous test matrix with the same model available on differently characterized nodes could verify improved placement and reduced cold-load churn compared with the current scheduler.
Confirmations
- I searched existing issues for duplicates.
- I agree to follow the Code of Conduct.
- 主要语言
- Go
- 星标
- 1.6k
- 派生
- 266
- 平均合并
- 3 天 6 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/Personal-AI-Router 的其他 Issue
-
难度 5/5 一周以上 新手友好度 20/100
NVIDIA/Personal-AI-Router#165 ·
维护者通常 5 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 46/100
NVIDIA/Personal-AI-Router#164 ·
维护者通常 5 天内回复
-
enhancement
难度 4/5 一周以上 新手友好度 12/100
NVIDIA/Personal-AI-Router#162 ·
维护者通常 5 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 25/100
NVIDIA/Personal-AI-Router#154 · 1 条评论 ·
维护者通常 5 天内回复
-
[Feature]: [Ollama] Alert the user about model pull failures可能已有人在做 @ckelseynv 于 3 天前认领。 未关闭enhancement
难度 3/5 1-2 天 新手友好度 56/100
NVIDIA/Personal-AI-Router#152 · 1 条评论 · 已指派 1 人 ·
维护者通常 5 天内回复
查看 NVIDIA/Personal-AI-Router 的全部 Issue
相似的 Issue
-
automation models
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/TypeScript#64758 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
SocialGouv/iterion#2369 ·
维护者通常 1 天内回复
-
daemon/cluster: imageWithDigestString returns the mirror error even when upstream resolves the tag未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
area/ci bug priority/p3
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复