Skip to content

[RFC] Flare beyond distillation: offline qualification evidence adapter #147

Open

Description

@Dong1017

结论 / 最小增量

除了源码蒸馏,建议先做一个 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"]
Loading

三个方向,先做第一片

优先级 可做什么 最小交付与边界
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 效果保持未验证。

后续研究问题,不提前实现

  1. 恢复的状态不止 KV。 cache.rs 的 checkpoint/fence 和 offload 区分完整 endpoint state、发布/退役、transfer ticket 与 waiter 生命周期。研究目标应是“恢复正确、实际替代多少 prefill、是否干扰并发 decode”,不只看命中率。
  2. 复用有成本。 上游 estimated transfer < 0.5 × replaced prefill 是一个待验证 policy arm,不是通用阈值;对照需冻结 workload、容量和质量 oracle。
  3. 准备与服务是兼容性边界。 runtime package design 当前 execution ABI 4 / prepared contract 2;不把不同 ABI/package/capacity 的结果直接横比。Python→Rust 本身不证明加速。

与现有工作分工

证据与限制

根 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

  1. added
    kind:rfcProposal / design discussion; scope review before build
    area:workbenchCLI workbench: profile, A/B loop, quality gates, evidence reports
    on Oct 25, 2026
  2. Dong1017 commented on Oct 25, 2026

    @Dong1017
    CollaboratorAuthor

    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 147 delegation. 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:

    Acceptance Current gap / change Decisive evidence
    Frozen schema/readset and one delivery metric Versioned offline packet contract pinned to Flare bce032c014bae34502ba22d3304fa084d5b40afe; select median client delivery_ttft_ns for measured ttft-512 groups Contract/readset documentation and complete synthetic packet
    Raw recomputation and immutable source Recompute from event observations, cross-check raw SSE/group coverage; receipt binds source, package, corpus, input and adapter identities Recomputed metric independent of summary; original input bytes unchanged
    Semantic rejection Check clock/grouping, coalesced events, actual prepared capacity, cache-token counters and resource conservation Positive fixture and each required negative case
    Existing integration Offline measurement CLI plus pair validation used by existing external_benchmark / validation_command; no new evaluator/runner Real local executor/runner integration; incomplete input yields INCONCLUSIVE
    Honest evidence boundary Label fixtures as synthetic contract tests No service-quality, performance, GPU or agent-efficacy claim

    Next: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workbenchCLI workbench: profile, A/B loop, quality gates, evidence reportskind:rfcProposal / design discussion; scope review before build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions