工程实践二次筛选 · Jay · 2026-07-19
执行时间: 2026-07-19 10:50 (Asia/Shanghai) 本次主题: 推理引擎实测 + Agent Memory 工程架构 检索范围: GitHub · Substack · arXiv · Medium · 官方技术博客 · Kubesimplify
一、推理引擎实测对比(高可信度 Benchmark)
🔥 KEEP — blog.kubesimplify.com:Local LLM Inference Engines on DGX Spark
链接: https://blog.kubesimplify.com/day-5-local-llm-inference-engines-wrappers-and-what-to-pick
实测日期: 2026-07-15 / 2026-07-16(vLLM 升级后复测)
标签: inference-engine vllm sglang tensorrt-llm benchmark dgx-spark
核心内容(真实环境 + 命令 + 性能数据): | 引擎 | 版本 | 首次请求 | 热请求中位数 | Startup | |------|------|---------|------------|---------| | vLLM | 0.25.1 | 31.75 tok/s | 31.80 tok/s | — | | SGLang | 0.5.15.post1 | 28.23 tok/s | 31.66 tok/s | 82s(含 34s 权重加载) | | TensorRT-LLM | 1.2.1 | 31.07 tok/s | 30.94 tok/s | — |
命令片段(可复现):
# SGLang 启动
docker stop day5-sglang-qwen3b
# 镜像版本 SGLang 0.5.15.post1
# 首次请求:256 tokens / 9.068s = 28.23 wall output tok/s
# 热请求:8.264s / 8.086s / 8.062s → 中位数 31.66 tok/s
关键发现: - SGLang RadixAttention 在单请求场景下优势未体现(无重复前缀复用) - 三引擎热请求性能几乎持平(31-32 tok/s BF16) - TGI 已于 2025年12月 进入维护模式,引导用户迁移至 vLLM / SGLang - TensorRT-LLM 模型切换成本高(benchmark 中"每换一次模型损失 28 分钟")
保留理由: ✅ 真实硬件(DGX Spark)、双日复测、可复现命令、tok/s 量化数据,非玄学 benchmark。
🔥 KEEP — arxiv.org/html/2607.14541v1:Atrex-Bench — LLM-Generated GPU Kernels
链接: https://arxiv.org/html/2607.14541v1
标签: gpu-kernels benchmark vllm sglang aiter rtp-llm production-traces
核心内容(来自生产 traces 的 kernel benchmark):
- 数据规模: 1,303 production profiles,跨 4 个 serving 框架(vLLM、SGLang、AITER、RTP-LLM)
- Benchmark 构成: 30 operators、440 hot shapes
- 算子耗时权重(Serving-Time Share):
- unified_attention: 36.1%(最大热点)
- fused_moe: 10.4%
- block_scaled_mm: 8.5%
- fp8_blockscale_fused_moe: 4.7%
- paged_attention_decode: 4.0%
- Top 5 算子合计 64%,其余 25 个算子分 36%
- Benchmark 亮点: 从生产 traces 构建(compute-limited / memory-rich GPU fleets,XPU-A + H20),非 Synthetic data
保留理由: ✅ 真实生产 traces、框架覆盖全(vLLM / SGLang / AITER / RTP-LLM)、算子级热点分析。可用于 GPU kernel 生成 Agent 的评测基准。
二、Agent Memory 工程架构(生产多 Agent 系统设计)
🔥 KEEP — llmengg.com:Multi-Agent System Memory and RAG(2026-04-25 工作坊)
链接: https://llmengg.com/multi-agent-system-memory-rag
标签: multi-agent memory rag production-architecture context-engineering
核心观点(架构设计模式,非理论): 1. Episodic Memory Store(情景记忆) - TTL eviction + importance-based compression 管理增长 - 并发更新:乐观并发控制(OCC),每条记录带 version 号,冲突时重试 2. Knowledge Base(知识库) - 增量 RAG indexing 应对演化知识 3. User Context(用户上下文) - Memory relevance decay:旧情景记忆权重随时间衰减 4. 会话状态 - Session summarisation:将多会话历史压缩为可检索摘要 5. 共享情景记忆一致性 - OCC 模式:写入包含 expected version,store 拒绝 version 不匹配的更新 - Glass-Box logging 记录所有 memory ops 供审计
保留理由: ✅ 生产多 Agent 系统的 memory 架构设计细节,不是泛泛而言的"用向量库存记忆"。涵盖一致性、压缩、衰减策略,可直接用于设计文档。
🔥 KEEP — github.com/JihadMobarak/agent-memory-build(Production Ready)
链接: https://github.com/JihadMobarak/agent-memory-build
标签: agent-memory rag sqlite chromadb production-ready multi-layer
三层 Memory 架构 + 性能数据:
| 层级 | 存储 | 关键设计 |
|---|---|---|
| STM(Short-Term) | Rolling buffer + LLM summarization | 对话上下文管理 |
| LTM(Long-Term) | SQLite + salience threshold 0.7 | 持久化事实存储,向量语义检索 |
| Entity Memory | JSON + 关系追踪 | 自动实体抽取,实体-关系-实体图 |
RAG Pipeline: - Chunking: Fixed(token-size + overlap) + Recursive(层级结构) - Embedding: Small(all-MiniLM-L6-v2,384D) / Large(all-mpnet-base-v2,768D) - Vector DB: ChromaDB + metadata filtering
性能数据(实测):
Chunking: ~10-50ms per 1000 tokens
Embedding: ~50-200ms per batch of 32
Vector search: ~10-50ms retrieval
LLM generation: 1-5s(主要耗时)
安装命令(可复现):
pip install -r requirements.txt
export ANTHROPIC_API_KEY="your-key"
保留理由: ✅ Production Ready、MIT License、三层 memory 有明确边界、性能数据完整、含 ablation study 计划。适合作为 Agent Memory 参考实现。
三、Agent Frameworks Q2 2026 版本时间线(工程选型参考)
🔥 KEEP — alicelabs.ai:AI Agent Frameworks 2026: Production-Tested Ranking
链接: https://alicelabs.ai/en/insights/best-ai-agent-frameworks-2026
标签: agent-frameworks langgraph anthropic crewai pydantic-ai llamaindex mcp a2a
版本化事件时间线(2026 Q2): | 日期 | 事件 | |------|------| | 2026-04-03 | Microsoft Agent Framework 1.0 发布(Semantic Kernel + AutoGen 合并),支持 MCP + A2A | | 2026-05-28 | CrewAI 1.14.6(含 06-11 更新):pluggable memory/knowledge/RAG/flow backends、Chat API、Snowflake Cortex | | 2026-06-11 | CrewAI 后续更新 | | 2026-06-22 | LlamaIndex Workflows 1.0 稳定版 | | 2026-06-23 | Pydantic AI V2 稳定版(harness-first redesign,capabilities 成为核心原语) | | 2026-06-22-23 | LangGraph per-node timeouts + DeltaChannel + v2 typed streaming API | | 2026-07-28(预计) | MCP 2026-07-28 spec RC(stateless 重构) | | 当前 | A2A 协议已有 150+ 组织采用 |
保留理由: ✅ 版本化的时间线,工程选型决策直接可用。Harness-first(Pydantic AI V2)和 Loop/LCurrency Engineering(langgraph)的对比有架构参考价值。
四、GitHub Trending — Agent Memory 开源生态(2026-07 扫描)
🔥 KEEP — mem0 (60.9k stars, updated 2026-07-16)
链接: https://github.com/mem0ai/mem0
标签: agent-memory universal-memory-layer open-source
备注: 通用 Memory Layer,支持多种 LLM 后端,生产使用广泛
🔥 KEEP — EverOS / MemOS(~10k stars, updated 2026-07-14/15)
链接: https://github.com/EverMind-AI/EverOS
标签: agent-memory local-first self-evolving openclaw
备注: local-first、Markdown-native、跨 App/工具/工作流,OpenClaw 插件集成
🔥 KEEP — TencentDB-Agent-Memory(9k stars)
链接: https://github.com/TencentCloud/TencentDB-Agent-Memory
标签: agent-memory local 4-tier-pipeline zero-external-api
备注: 完全本地化,4 层递进 pipeline,零外部 API 依赖
🔥 KEEP — honcho(6k stars, updated 2026-07-15)
链接: https://github.com/plastic-labs/honcho
标签: agent-memory stateful openai anthropic langchain
备注: State management + embeddings + continual learning
五、丢弃条目(低工程价值)
| 条目 | 来源 | 丢弃理由 |
|---|---|---|
| SGLang Is 29% Faster Than vLLM... | Medium(会员墙) | ❌ Member-only,全文不可验证;TGI EOL 信息有价值但全文无法引用 |
| awesome-llm-token-optimization | GitHub | ⚠️ 汇总列表,非一手工程内容;可作参考但不是精读源 |
| Substack riorundown(Loop vs Harness Engineering) | Substack | ⚠️ News aggregator,无原创工程内容;概念有参考价值但不收录原文 |
| Substack theainetworkengineer(Context Contract) | Substack | ⚠️ 摘要太薄,无源码/命令/数据支撑 |
汇总
| 分类 | 条目数 | 高价值 |
|---|---|---|
| 推理引擎 Benchmark | 2 | 2 |
| Agent Memory 架构 | 4 | 4 |
| Agent Frameworks Q2 | 1 | 1 |
| 开源生态 | 4 | 4 |
建议写入路径: /shared/research-kb/inbox/jay/2026-07-19-1050-inference-engine-benchmark-agent-memory-engineering.md(本文档)
建议精读: 1. Kubesimplify DGX Spark 实测(可复现 benchmark) 2. Atrex-Bench arxiv(kernel benchmark 方法论) 3. agent-memory-build(分层 memory 参考实现) 4. llmengg.com multi-agent memory(生产架构设计)
建议审稿: Pydantic AI V2 harness-first 设计 vs LangGraph loop engineering 对比,可补充至 Agentic Stack 主题页。