Repository navigation
[RFC] Flare beyond distillation: offline qualification evidence adapter #147
Description
结论 / 最小增量
除了源码蒸馏,建议先做一个 Flare qualification 结果的离线证据适配器+负向 fixtures。 复用 InferRSI 的 external_benchmark / validation_command 和现有 evaluator,不移植 Rust serving engine、不新增执行平台。
状态:RFC / proposed。本 issue 不授权模型/GPU运行、预算消耗或自动接入。蒸馏可独立推进;此处交付的是可验证的实验接口,不是又一份知识摘要。
为什么值得做
NVIDIA/flare-local-inference 当前是面向 SM120/SM121 的本地推理研究原型,明确不是 vLLM 替代品。它提供的价值不止 Python 准备 / Rust 服务分工,还包括完整会话状态恢复、成本约束下的复用,以及分层测量证据。
源码基线:Flare bce032c014bae34502ba22d3304fa084d5b40afe;InferRSI 65147a03e465dc838770474736a620e04d72337e。以下为源码观察和工程提案,不是本地运行结果。
flowchart LR
A["已有 Flare qualification 原始产物"] --> B["新增:离线语义适配器 + fixtures"]
B --> C["现有 validation_command"]
C --> D["现有 evaluator / evidence packet"]
D --> E["保留质量、完整性与 INCONCLUSIVE 边界"]
F["可选后续:会话恢复场景与准备产物预检"] -.-> B
G["独立:repo 源码蒸馏"] -.-> H["现有知识库 / Tracking #91"]
三个方向,先做第一片
| 优先级 | 可做什么 | 最小交付与边界 |
|---|---|---|
| P0 | qualification 证据适配 | 一个离线 CLI、一个最小样例 packet、正负 fixtures;只读保留产物,不启动服务/模型 |
| 后续可选 | 完整会话状态恢复场景 | miss / GPU hit / host restore / restart / branch / cancel 的工作负载与证据要求;不是新 offload backend |
| 后续可选 | preparation / serving 兼容性预检 | 在同一适配器核对 package、ABI、模型/前端与实际容量;不是新 artifact 平台 |
P0 的真实差距
InferRSI 已有 RunSpec、完整性/质量判定 和 artifact 工具。不重复建设这些能力。
增量在源结果语义:通用 scalar metric reader 不负责理解 Flare 的 SSE 分组、clock domain、prepared capacity 和复用计数守恒。Flare qualification 与 provenance 可作为固定版本的输入契约参考。
| 不能混为一谈 | 适配器须保留的语义 |
|---|---|
| SSE event 与单 token | coalesced tokens 保留同组时间戳,不捏造逐 token ITL |
| 客户端 delivery 与 native completion | 不跨时钟域相减;HTTP TTFT 不标成纯 GPU prefill |
| cache lookup hit 与实际采用恢复 | 区分成本/容量/入队拒绝与 admitted;核验实际 reused tokens |
| 测量标签与真实准备容量 | 与 preparation memory report 核对,不拿不同容量伪装同条件 |
| summary 与原始证据 | 复算首个选定 delivery metric;保留缺组、失败和资源计数不一致 |
P0 验收清单
- 冻结输入 schema/readset,选定一个 delivery metric;明确 unit、clock domain、grouping 和 comparison scope。
- 从 raw observations 复算,不只信任 summary;原始 packet 不变,派生 receipt 绑定 source/package/corpus/adapter identities。
- 覆盖完整正常样例及缺 raw/group、错 clock、错误展开 coalesced event、capacity mismatch、counter/resource mismatch。
- 无效或不完整输入拒绝/明确标记,不补零、不制造 PASS;交给现有 evaluator 保留 INCONCLUSIVE。
- 通过已有
validation_command集成;不新增全局 evaluator、runner 或平行判定体系。 - 离线 fixture PASS 仅代表适配/校验行为通过;真实服务质量、性能、agent 效果保持未验证。
后续研究问题,不提前实现
- 恢复的状态不止 KV。 cache.rs 的 checkpoint/fence 和 offload 区分完整 endpoint state、发布/退役、transfer ticket 与 waiter 生命周期。研究目标应是“恢复正确、实际替代多少 prefill、是否干扰并发 decode”,不只看命中率。
- 复用有成本。 上游 estimated transfer < 0.5 × replaced prefill 是一个待验证 policy arm,不是通用阈值;对照需冻结 workload、容量和质量 oracle。
- 准备与服务是兼容性边界。 runtime package design 当前 execution ABI 4 / prepared contract 2;不把不同 ABI/package/capacity 的结果直接横比。Python→Rust 本身不证明加速。
与现有工作分工
- [Roadmap] InferRSI: reusable knowledge, verifiable inference optimization #61:Workbench / Target System 分离;Flare 是外部研究对象,不把 InferRSI 改成服务引擎。
- [RFC] Benchmark selection by task for InferRSI #60 / [RFC] Bottleneck-driven optimization: scheduling, caching, and parallelism/pipelining #131:复用 workload、指标/质量门槛与缓存调度机制边界。
- 已合入 feat: add model-aware inference research preparation #111:复用模型准备、格式兼容和阶段成本研究,不另建 preparation 平台。
- Skill Eval v1.1: automated evaluation for skill additions and updates #88 / Skill Eval: automate PR evaluation planning and feedback #101 / feat: plan and report skill PR evaluations with explicit authorization #118:skill 变更效果评估;[RFC] Skill Indexer: better skill and context selection through collect #128:知识上下文选择实验;本 issue 的运行时状态与测量语义不替代它们。
- [RFC] Goal checkpoints: explicit progress and next actions across agent sessions #137:agent goal checkpoint,不等于模型会话/KV checkpoint。
- [Tracking] SearchSpace distillation coverage and knowledge consolidation #91:登记新来源和后续交付;历史 [RFC] Repository knowledge distillation: source coverage, incremental updates and reusable mechanisms #48 不重开。未交付前不增加蒸馏/资源覆盖计数。
证据与限制
根 LICENSE 为 Apache-2.0;复制源代码须保留适用通知,模型/依赖许可另核。上游 最新提交 的测试/服务资格说明不是本地复现,且 completed performance comparison 尚未完成。测量文档 要求分清 GPU replay、native scheduling/submission、HTTP 层。本次未运行测试、模型或 GPU 实验。
检索记录:截至 2026-10-25,本仓库不限状态的 title/body/comments 中 Flare 与 flare-local-inference 查询均无命中;这不是对未索引内容的绝对不存在证明。
独立蒸馏任务
源码蒸馏已单列为 #148(#91 的原生子议题):准备产物边界与完整会话状态生命周期。该知识任务与本 RFC 的离线证据适配器分别验收,不因其中一项完成而自动关闭另一项。
Activity
Dong1017 commentedon Oct 25, 2026
Issue owner claim and accepted P0 plan
I am the Codex agent in the invoking owner session, acting as Issue-level owner under the user's explicit
inferrsi-issue 147delegation. This accepts the bounded P0 implementation, delivery PR/review/integration work and whole-Issue acceptance/closure responsibility, subject to the workflow's independent current-head Dong1017 review and all applicable CI gates.Boundary: #148 is assigned to another agent. Its source distillation, knowledge registrations and #91 bookkeeping remain separately owned and separately accepted. This Issue does not depend on completing that knowledge slice. No model, GPU, cloud or paid execution is authorized or planned.
Preflight: upstream main is
65147a03e465dc838770474736a620e04d72337e; no existing Flare delivery PR was found. Existing unrelated local work will be preserved using an isolated task directory. Current RunSpec, external executor, metric reader, evaluator, artifact helpers and repository contribution/collaboration templates have been inspected.One coherent delivery PR is planned:
bce032c014bae34502ba22d3304fa084d5b40afe; select median clientdelivery_ttft_nsfor measuredttft-512groupsexternal_benchmark/validation_command; no new evaluator/runnerNext: implement the adapter, packet and focused tests; run applicable local checks; publish a Ready PR with exact revisions and request independent Dong1017 approval. Real service task-quality validation remains an additional campaign-owned requirement; adapter consistency is not a task-quality oracle.