Phase 4 readiness: validate DSL Qwen output against HF reference on real GGUFs
维护者通常 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:
- Legacy gets deleted in Phase 4. Once
LlamaRuntimeis gone, DSL-vs-legacy parity is permanently moot. Optimising for it is debt. - Neither path is the source of truth. The real correctness reference is HuggingFace
transformers(orllama.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:
- Takes a Qwen3-1.7B-Q8_0 GGUF (per existing
tests/smoke/smoke-models.json), runs it throughkllama-clion the DSL path (after Phase 4) for a fixed prompt at temperature 0. - Captures top-K next-token IDs / probabilities at each step.
- Compares against an external reference for the same prompt:
- Option A: pre-computed reference logged via
transformersPython script, checked into the repo as a fixture. - Option B: live comparison via
llama.cppCLI invocation (more setup, more runtime).
- Option A: pre-computed reference logged via
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
LlamaRuntimenumerical 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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SKaiNET-developers/SKaiNET-transformers 的其他 Issue
-
documentation good first issue size:xs skill:docs sub-issue
难度 2/5 1-3 小时 新手友好度 78/100
SKaiNET-developers/SKaiNET-transformers#478 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement skill:kotlin-core
难度 4/5 3-5 天 新手友好度 48/100
SKaiNET-developers/SKaiNET-transformers#502 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
SKaiNET-developers/SKaiNET-transformers#483 ·
维护者通常 1 天内回复
-
coding good first issue size:s skill:kotlin-core sub-issue
难度 4/5 1-2 天 新手友好度 64/100
SKaiNET-developers/SKaiNET-transformers#477 · 1 条评论 ·
维护者通常 1 天内回复
-
coding good first issue size:s skill:numerics sub-issue
难度 4/5 3-5 天 新手友好度 55/100
SKaiNET-developers/SKaiNET-transformers#476 · 1 条评论 ·
维护者通常 1 天内回复
查看 SKaiNET-developers/SKaiNET-transformers 的全部 Issue
相似的 Issue
-
design good first issue help wanted
难度 2/5 1-3 小时 新手友好度 68/100
scribe-org/Scribe-Android#739 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 76/100
xybrid-ai/xybrid#661 · 1 条评论 ·
维护者通常 1 天内回复
-
android bug kotlin vulkan
难度 2/5 1-3 小时 新手友好度 68/100
maplibre/maplibre-native-ffi#852 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复