⚡ WarpGBM MCP 服务
GPU加速的梯度提升作为云MCP服务\ 在A10G GPU上进行训练 • 获取 artifact_id 对于\ B[Get artifact_id + model]B --> C[5min Cache] C --> D[ E[Download Artifact] E --> F[Use Anywhere]
1. **火车**提交您的数据 → 在A10G GPU上训练 → 获取结果 `artifact_id` + 便携式文物
1. **快速路径**使用 `artifact_id` → 低于100毫秒的缓存预测(有效期5分钟)
1. **慢行道**使用 `model_artifact_joblib` → 任意地点下载并使用
**建筑学**🔒 无状态 • 🚀 无需模型存储 • 💾 您拥有自己的成果
______________________________________________________________________
## ⚡ 快速启动
### 对于人工智能代理(MCP)
添加到您的MCP设置中(例如。, `.cursor/mcp.json`):
{ "mcpServers": { "warpgbm": { "url": "https://warpgbm.ai/mcp/sse" } } }
### 开发者(REST API)
1. Train a model
curl -X POST https://warpgbm.ai/train \ -H "Content-Type: application/json" \ -d '{ "X": [[5.1,3.5,1.4,0.2], [6.7,3.1,4.4,1.4], ...], "y": [0, 1, 2, ...], "model_type": "warpgbm", "objective": "multiclass" }'
Response includes artifact_id for fast predictions
{"artifact_id": "abc-123", "model_artifact_joblib": "H4sIA..."}
2. Make fast predictions (cached, 💡 完整示例:鸢尾花数据集⚠️ 重要 WarpGBM使用分位数分箱,这需要 60多个样本
______________________________________________________________________
为了进行适当的训练。样本数量较少时,模型无法学习到正确的决策边界。
🏠 自建服务器/自我托管
# Clone repo
git clone https://github.com/jefferythewind/mcp-warpgbm.git
cd mcp-warpgbm
# Setup environment
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Run locally (GPU optional for dev)
uvicorn local_dev:app --host 0.0.0.0 --port 8000 --reload
# Test
curl http://localhost:8000/healthz本地开发
# Install Modal
pip install modal
# Authenticate
modal token new
# Deploy
modal deploy modal_app.py
# Service will be live at your Modal URL部署到 Modal(生产环境)
# Docker (requires GPU)
docker build -t warpgbm-mcp .
docker run --gpus all -p 8000:8000 warpgbm-mcp
# Fly.io, Railway, Render, etc.
# See their respective GPU deployment docs______________________________________________________________________
部署到其他平台
# Install dev dependencies
pip install -r requirements-dev.txt
# Run all tests
./run_tests.sh
# Or use pytest directly
pytest tests/ -v
# Test specific functionality
pytest tests/test_train.py -v
pytest tests/test_integration.py -v______________________________________________________________________
🧪 测试
mcp-warpgmb/
├── app/
│ ├── main.py # FastAPI app + routes
│ ├── mcp_sse.py # MCP Server-Sent Events
│ ├── model_registry.py # Model backend registry
│ ├── models.py # Pydantic schemas
│ ├── utils.py # Serialization, caching
│ ├── x402.py # Payment verification
│ └── feedback_storage.py # Feedback persistence
├── .well-known/
│ ├── mcp.json # MCP capability manifest
│ └── x402 # X402 pricing manifest
├── docs/
│ ├── AGENT_GUIDE.md # Comprehensive agent docs
│ ├── MODEL_SUPPORT.md # Model parameter reference
│ └── WARPGBM_PYTHON_GUIDE.md
├── tests/
│ ├── test_train.py
│ ├── test_predict.py
│ ├── test_integration.py
│ └── conftest.py
├── examples/
│ ├── simple_train.py
│ └── compare_models.py
├── modal_app.py # Modal deployment config
├── local_dev.py # Local dev server
├── requirements.txt
└── README.md______________________________________________________________________
📦 项目结构
💰 价格(X402)
Base网络上的可选微支付: | 终点 | 价格 | 描述 | |----------|-------|-------------| /train | | 0.01美元 | 在GPU上训练模型,获取成果物 | /predict_from_artifact | | $0.001 | 批量预测 | /predict_proba_from_artifact | | $0.001 | 概率预测 | /feedback |
| 免费 | 帮助我们改进! |注 /.well-known/x402 演示/测试时付款可选。请参阅______________________________________________________________________
详情如下。
🔐 安全与隐私 ✅无状态的\ 没有持久化的训练数据或模型 ✅ 翻译成中文是:✓(正确/对)沙盒化的\ 在临时隔离的目录中运行 ✅数量有限\ 最大请求负载50 MB ✅无代码执行\ 仅支持结构化JSON参数 ✅速率受限\ 按IP限制速率以防止滥用 ✅只读文件系统
______________________________________________________________________
模式部署使用不可变文件系统
🌍 可用模型
- 🚀 WarpGBM(GPU)加速度
- NVIDIA A10G 显卡速度
- 比LightGBM快13倍最适合用于
- 时间序列、金融建模、时序数据特别
- 时代感知的分割,不变性学习最小样本数
60+人推荐
- ⚡ LightGBM(CPU)加速
- 高度优化的CPU速度
- 比scikit-learn快10到100倍最适合用于
- 一般表格数据,大型数据集特别
- 分类特征,低内存最小样本数
______________________________________________________________________
20岁以上
- 🗺️ 路线图
- \[x\] 核心训练 + 推理端点
- \[x\] 智能工件缓存(5分钟生存时间)
- \[x\] MCP 服务器发送事件(Server-Sent Events)集成
- \[x\] X402付款验证
- \[x\] 使用GPU的模态部署
- \[x\] 自定义域名(warpgbm.ai)
- \[x\] Smithery市场列表
- \[ \] 支持导出ONNX格式
- \[ \] 用于大型数据集的异步作业队列
- \[ \] 支持S3/IPFS数据集URL
warpgbm-client\[ \] Python 客户端库( - )
______________________________________________________________________
\[ \] 额外的模型后端(XGBoost、CatBoost)
💬 反馈与支持
帮助我们为AI代理优化这项服务!
- 提交关于以下方面的反馈:
- 缺少能够解锁新应用场景的功能
- 令人困惑的文档或错误信息
- 性能问题或超时问题
# Via API
curl -X POST https://warpgbm.ai/feedback \
-H "Content-Type: application/json" \
-d '{
"feedback_type": "feature_request",
"message": "Add support for XGBoost backend",
"severity": "medium"
}'您希望看到的其他模型类型
- 或者通过:GitHub Issues(GitHub问题) :
- mcp-warpgbm/issues(可译为:“MCP WarpGBM 问题追踪/议题”)GitHub 讨论区 :
- warpgbm/讨论(或“warpgbm/讨论区”)电子邮件
______________________________________________________________________
support@warpgbm.ai(这个邮箱地址本身在中文中通常不直接翻译,而是保持原样,表示“支持邮箱:support@warpgbm.ai”)
- 📚 了解更多 🐍(蛇) WarpGBM Python 库
- \- 核心库(91+ 星) 🤖 机器人 代理指南
- \- AI代理的完整使用指南 📖 书籍 API 文档
- \- 交互式OpenAPI文档 🔌 电源插头/插座 模型上下文协议
- \- MCP规范 💰(钱) X402 规范
- \- 代理支付协议 ☁️ 云朵 模态文档
______________________________________________________________________
- 无服务器GPU平台
📄 许可证 GPL-3.0(通用公共许可证第3版) (与……相同WarpGBM核心
)
______________________________________________________________________
这确保了MCP封装的改进能惠及整个社区,同时允许通过云服务进行商业使用。
🙏 致谢
- 构建于: WarpGBM
- - GPU加速的GBDT库 模态
- - 无服务器GPU基础设施 FastAPI
- - 现代Python网络框架 LightGBM
______________________________________________________________________
- 微软的GBDT库
