Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Phase 4 readiness: validate DSL Qwen output against HF reference on real GGUFs

未关闭
#118 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #119 来自 @michalharakal —— 已关闭,未合并

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
huggingface, kotlin

调研方向

Start with tests/smoke/smoke-models.json and the existing tests/smoke/ harness to see how models are selected and run. Add a smoke comparison for the Qwen3-1.7B-Q8_0 GGUF on the DSL path, using a fixed prompt and temperature 0; choose either a checked-in Transformers reference fixture or a live llama.cpp reference. Done means the first N greedy tokens agree and top-K probability KL divergence is below the chosen threshold.

由索引模型根据 Issue 内容生成。

描述

Replaces #114 with a focused scope. Phase-4 readiness gate before swapping the CLI Qwen branch from LlamaRuntime to OptimizedLLMRuntime + qwenNetwork().

Why this gate, not synthetic parity

The original #114 framed readiness as "DSL ↔ legacy LlamaRuntime numerical parity on identical synthetic weights". That framing has two problems:

  1. Legacy gets deleted in Phase 4. Once LlamaRuntime is gone, DSL-vs-legacy parity is permanently moot. Optimising for it is debt.
  2. Neither path is the source of truth. The real correctness reference is HuggingFace transformers (or llama.cpp) running the same Qwen3 GGUF — that's what users compare against. Synthetic-weight equivalence between two of our paths only tells us they're internally consistent, not that either is correct.

So the right gate is: DSL Qwen, fed a real Qwen3 GGUF, produces output that matches an HF reference within tolerance. The legacy path is allowed to disagree; if DSL matches HF and legacy doesn't, legacy was the wrong one all along.

Scope

Add an HF-reference smoke comparison to tests/smoke/ that:

  1. Takes a Qwen3-1.7B-Q8_0 GGUF (per existing tests/smoke/smoke-models.json), runs it through kllama-cli on the DSL path (after Phase 4) for a fixed prompt at temperature 0.
  2. Captures top-K next-token IDs / probabilities at each step.
  3. Compares against an external reference for the same prompt:
    • Option A: pre-computed reference logged via transformers Python script, checked into the repo as a fixture.
    • Option B: live comparison via llama.cpp CLI invocation (more setup, more runtime).

Pass criterion: top-1 token agrees with reference for the first N greedy steps (e.g. N=8); top-K probability KL-divergence below threshold.

Out of scope

  • DSL-vs-legacy LlamaRuntime numerical parity (the original #114 question). The fixes from #116 (RoPE NEOX) and #117 (QK-norm eps) shipped because they're independently correct, not because they close synthetic parity. Synthetic divergence remains (max |Δ| = 49.26 at pos 0 on the parity probe), root cause unknown — and that's fine, the ship gate now sits elsewhere.
  • Quantized parity. Phase 1B.2 (#113) already smoke-tested Q8 round-trip equivalence inside the DSL path. HF reference comparison can also be FP32-only initially.

Phase 4 — blocked on this gate

Phase 4 (CLI swap, delete LlamaRuntime family) should not merge until at least one greedy-token comparison passes against an HF reference on a real Qwen3 GGUF.

#52 was the other Phase-4 blocker; resolved by #115 (byte-level BPE).

Refs the closed #114, which has the historical investigation context.

主要语言
Kotlin
星标
8
派生
3
平均合并
1 天 16 小时
30 天内合并 PR
48

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

SKaiNET-developers/SKaiNET-transformers 的其他 Issue

查看 SKaiNET-developers/SKaiNET-transformers 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。