GPU Cluster Manager
You are managing a GPU cluster that combines multiple machines into one inference endpoint for running local LLMs via Ollama. The GPU cluster routes every request to the best available device automatically.
What this GPU cluster solves
Your desktop, laptop, and maybe an old Linux box all have GPUs sitting idle most of the time. You want one GPU cluster URL that uses all of them — without Kubernetes, without Docker, without editing config files. Just point your AI apps at the GPU cluster endpoint and let the cluster figure out which machine should handle each request.
This GPU cluster manager does exactly that. Install it, run two commands, and your GPU cluster machines discover each other automatically. The GPU cluster learns when your devices are free, pauses during video calls, and picks the best GPU cluster node for every request based on real-time conditions.
Getting started with the GPU cluster
CODEBLOCK0
On your main GPU cluster machine (the router):
CODEBLOCK1
On each other GPU cluster machine:
CODEBLOCK2
That's it. The GPU cluster nodes find the router via mDNS. No config files. Your GPU cluster is running.
If mDNS doesn't work on your GPU cluster network: INLINECODE0
GPU Cluster Endpoint
Your GPU cluster runs at http://localhost:11435. Point any AI app at the GPU cluster:
CODEBLOCK3
Works with: LangChain, CrewAI, AutoGen, LlamaIndex, Aider, Cline, Continue.dev, and any OpenAI-compatible client pointing at the GPU cluster.
GPU Cluster Smart Features
- - GPU cluster auto-discovery — machines find each other via mDNS, no config
- 7-signal GPU cluster scoring — picks the best machine based on loaded models, memory, queue depth, latency, and more
- GPU cluster meeting detection — pauses inference when your camera/mic is active (macOS)
- GPU cluster capacity learning — learns your weekly patterns (168-hour behavioral model)
- GPU cluster context protection — prevents models from reloading when apps send different context sizes
- GPU cluster auto-pull — if you request a model that doesn't exist, it downloads to the best GPU cluster node
- GPU cluster auto-retry — if a machine hiccups, retries on the next-best GPU cluster node
Check your GPU cluster
GPU cluster status — all machines
CODEBLOCK4
What models are available on the GPU cluster?
CODEBLOCK5
What's loaded in GPU cluster memory right now?
CODEBLOCK6
How healthy is the GPU cluster?
CODEBLOCK7
GPU cluster model recommendations
CODEBLOCK8
Returns GPU cluster recommendations based on your hardware — which models fit, which are too big, and the optimal GPU cluster mix.
GPU cluster recent activity
CODEBLOCK9
GPU cluster usage stats
CODEBLOCK10
GPU cluster settings
CODEBLOCK11
Manage GPU cluster models
CODEBLOCK12
GPU cluster per-app tracking
CODEBLOCK13
Tag your GPU cluster requests to see which apps use the most time:
CODEBLOCK14
GPU Cluster Dashboard
Open http://localhost:11435/dashboard for a visual GPU cluster overview. Eight tabs: Fleet Overview (live GPU cluster node cards), Trends (charts), Model Insights (performance comparison), Apps (per-app usage), Benchmarks, Health (automated GPU cluster checks), Recommendations (what models to run), Settings.
Try the GPU cluster
CODEBLOCK15
GPU Cluster Troubleshooting
Check what's slow in the GPU cluster
CODEBLOCK16
See GPU cluster failures
CODEBLOCK17
GPU Cluster Guardrails
- - Never restart or stop the GPU cluster without explicit user confirmation.
- Never delete or modify files in
~/.fleet-manager/ (contains all your GPU cluster data and logs). - Do not pull or delete models on the GPU cluster without user confirmation — downloads can be 10-100+ GB.
- If a GPU cluster machine shows as offline, report it rather than attempting to SSH into it.
GPU Cluster Failure Handling
- - Connection refused → GPU cluster router may not be running, suggest
herd or INLINECODE5 - 0 nodes online → suggest starting
herd-node on GPU cluster devices - mDNS discovery fails → use INLINECODE7
- GPU cluster requests hang → check for
num_ctx in client requests; context protection handles it - GPU cluster errors → check INLINECODE9
GPU集群管理器
您正在管理一个GPU集群,该集群将多台机器整合为一个推理端点,通过Ollama运行本地大语言模型。GPU集群会自动将每个请求路由到最佳可用设备。
该GPU集群解决的问题
您的台式机、笔记本电脑,甚至可能还有一台旧Linux主机,它们的GPU大部分时间都处于闲置状态。您需要一个GPU集群URL来使用所有这些资源——无需Kubernetes、无需Docker、无需编辑配置文件。只需将您的AI应用指向GPU集群端点,让集群自行决定哪台机器处理每个请求。
这个GPU集群管理器正是为此而生。安装它,运行两条命令,您的GPU集群机器就会自动发现彼此。GPU集群会学习您的设备何时空闲,在视频通话期间暂停推理,并根据实时条件为每个请求选择最佳的GPU集群节点。
GPU集群快速入门
bash
pip install ollama-herd # 从PyPI安装GPU集群管理器
在主GPU集群机器(路由器)上:
bash
herd # 启动GPU集群路由器
在其他每台GPU集群机器上:
bash
herd-node # 自动加入GPU集群
就这样。GPU集群节点通过mDNS自动发现路由器。无需配置文件。您的GPU集群已运行。
如果mDNS在您的GPU集群网络上不起作用:herd-node --router-url http://router-ip:11435
GPU集群端点
您的GPU集群运行在http://localhost:11435。将任何AI应用指向GPU集群:
python
from openai import OpenAI
GPU集群客户端
gpu
clusterclient = OpenAI(base
url=http://localhost:11435/v1, apikey=not-needed)
gpu
clusterresponse = gpu
clusterclient.chat.completions.create(
model=llama3.3:70b,
messages=[{role: user, content: 解释用于AI推理的GPU集群路由}]
)
兼容:LangChain、CrewAI、AutoGen、LlamaIndex、Aider、Cline、Continue.dev,以及任何指向GPU集群的OpenAI兼容客户端。
GPU集群智能特性
- - GPU集群自动发现 — 机器通过mDNS相互发现,无需配置
- 7信号GPU集群评分 — 根据已加载模型、内存、队列深度、延迟等选择最佳机器
- GPU集群会议检测 — 当摄像头/麦克风活跃时暂停推理(macOS)
- GPU集群容量学习 — 学习您的每周模式(168小时行为模型)
- GPU集群上下文保护 — 防止应用发送不同上下文大小时重新加载模型
- GPU集群自动拉取 — 如果请求的模型不存在,自动下载到最佳GPU集群节点
- GPU集群自动重试 — 如果某台机器出现故障,自动在次优GPU集群节点上重试
检查您的GPU集群
GPU集群状态 — 所有机器
bash
curl -s http://localhost:11435/fleet/status | python3 -m json.tool
GPU集群上有哪些可用模型?
bash
curl -s http://localhost:11435/api/tags | python3 -m json.tool
GPU集群内存中当前加载了什么?
bash
curl -s http://localhost:11435/api/ps | python3 -m json.tool
GPU集群的健康状况如何?
bash
curl -s http://localhost:11435/dashboard/api/health | python3 -m json.tool
GPU集群模型推荐
bash
curl -s http://localhost:11435/dashboard/api/recommendations | python3 -m json.tool
根据您的硬件返回GPU集群推荐——哪些模型适合、哪些太大,以及最佳的GPU集群组合。
GPU集群最近活动
bash
curl -s http://localhost:11435/dashboard/api/traces?limit=10 | python3 -m json.tool
GPU集群使用统计
bash
curl -s http://localhost:11435/dashboard/api/usage | python3 -m json.tool
GPU集群设置
bash
curl -s http://localhost:11435/dashboard/api/settings | python3 -m json.tool
curl -s -X POST http://localhost:11435/dashboard/api/settings \
-H Content-Type: application/json \
-d {auto_pull: false}
管理GPU集群模型
bash
查看每个GPU集群节点上的模型
curl -s http://localhost:11435/dashboard/api/model-management | python3 -m json.tool
下载模型到特定GPU集群节点
curl -s -X POST http://localhost:11435/dashboard/api/pull \
-H Content-Type: application/json \
-d {model: llama3.3:70b, node_id: gpu-cluster-studio}
从GPU集群节点删除模型
curl -s -X POST http://localhost:11435/dashboard/api/delete \
-H Content-Type: application/json \
-d {model: old-model:7b, node_id: gpu-cluster-studio}
GPU集群按应用追踪
bash
curl -s http://localhost:11435/dashboard/api/apps | python3 -m json.tool
为您的GPU集群请求打标签,查看哪些应用占用最多时间:
bash
curl -s http://localhost:11435/v1/chat/completions \
-H Content-Type: application/json \
-d {model:llama3.3:70b,messages:[{role:user,content:总结GPU集群利用率}],metadata:{tags:[gpu-cluster-app]}}
GPU集群仪表盘
打开http://localhost:11435/dashboard查看可视化GPU集群概览。八个标签页:舰队概览(实时GPU集群节点卡片)、趋势(图表)、模型洞察(性能对比)、应用(按应用使用情况)、基准测试、健康(自动化GPU集群检查)、推荐(运行哪些模型)、设置。
尝试GPU集群
bash
快速GPU集群测试
curl -s http://localhost:11435/api/chat \
-d {model:llama3.2:3b,messages:[{role:user,content:来自GPU集群的问候!}],stream:false}
GPU集群故障排除
检查GPU集群中哪些操作缓慢
bash
sqlite3 ~/.fleet-manager/latency.db SELECT model, node
id, AVG(latencyms)/1000.0 as avg
secs, COUNT(*) as n FROM requesttraces WHERE status=completed GROUP BY node
id, model HAVING n > 5 ORDER BY avgsecs DESC LIMIT 10
查看GPU集群故障
bash
sqlite3 ~/.fleet-manager/latency.db SELECT request
id, model, status, errormessage, latency
ms/1000.0 as secs FROM requesttraces WHERE status=failed ORDER BY timestamp DESC LIMIT 10
GPU集群安全护栏
- - 未经用户明确确认,切勿重启或停止GPU集群。
- 切勿删除或修改~/.fleet-manager/中的文件(包含所有GPU集群数据和日志)。
- 未经用户确认,不要在GPU集群上拉取或删除模型——下载可能达到10-100+ GB。
- 如果GPU集群机器显示离线,请报告问题,而不是尝试SSH登录。
GPU集群故障处理
- - 连接被拒绝 → GPU集群路由器可能未运行,建议运行herd或uv run herd
- 0个节点在线 → 建议在GPU集群设备上启动herd-node
- mDNS发现失败 → 使用--router-url http://router-ip:11435
- GPU集群请求挂起 → 检查客户端请求中的num_ctx;上下文保护会处理此问题
- GPU集群错误 → 检查~/.fleet-manager/logs/herd.jsonl