[Lane 4 · kotlin-core] tokenizer.json parity — gated parity test replaying the goldens through both tokenizer.json entry points
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Read Gemma4TokenizerParityTest.kt for the self-skip pattern and llm-core/build.gradle.kts for the Gradle task entry point. Add TokenizerJsonGoldenParityTest.kt under llm-core/src/jvmTest/.../tokenizer/, then run the fixture download task and targeted jvmTest command from the issue. Done means both tokenizer JSON entry points are checked against every golden, expected failures are enforced, and the test skips with a notice when fixtures are unavailable.
由索引模型根据 Issue 内容生成。
描述
Sub-issue of #471 (tokenizer.json parity gate).
Lane: 4 · Ground truth / CI
Skill needed: Kotlin and Gradle; you copy an existing self-skipping test. No tokenizer internals.
Size: s (a few hours)
Blocked by: the golden-generation lane (needs the JSON files)
What to do
- Copy the self-skip pattern of Gemma4TokenizerParityTest.kt into a new
llm-core/src/jvmTest/kotlin/sk/ainet/apps/llm/tokenizer/TokenizerJsonGoldenParityTest.kt. - Fixture location:
$TOKENIZER_GOLDEN_FIXTURES_DIR/<family>/tokenizer.json(environment variable; skip with a printed notice when unset). Add a Gradle taskdownloadTokenizerGoldenFixturesinllm-core/build.gradle.ktsthat reads each golden'srepo/revision/path, downloads the file from the HubresolveURL (honouringHF_TOKENfor gated repos) intobuild/test-fixtures/tokenizer-goldens/<family>/, and checks thesha256. Point the test at that directory by default. - For every golden and for both entry points —
TokenizerFactory.fromTokenizerJsonStringandGGUFTokenizer.fromTokenizerJson— assert either (a) every case'sencode(text) == ids, or (b) the entry point throwsUnsupportedTokenizerException(allowed only forfromTokenizerJsonString, see the fail-fast lane). Any other exception is a failure. The assertion message prints text, expected ids, expected token strings and actual ids. - Support an optional per-case
"expectedToFail": {"<entry point>": "<issue url>"}marker in the golden JSON: such a case must still fail, and the message tells the developer to remove the marker once it passes. This lets the test merge today and become the progress bar for the Lane 2 fixes and the engine lanes. - Run
./gradlew :llm-core:downloadTokenizerGoldenFixtures :llm-core:jvmTest --tests '*TokenizerJsonGoldenParityTest*'; add the task to thesmoke-reference.ymlworkflow's model-gated job if the maintainers agree (ask on the PR).
Acceptance
- Test self-skips without fixtures; passes with fixtures and the current markers
- Both entry points are exercised for every golden
- Marker mechanism documented in the test's KDoc
- Result reported back on #471
Notes
Gemma4TokenizerParityTest stays as is (it also checks atomic specials with hand-written ids); the new test is the general gate. Keep it in jvmTest: it needs the filesystem and network-fetched fixtures.
- 主要语言
- Kotlin
- 星标
- 8
- 派生
- 3
- 平均合并
- 19 小时 45 分钟
- 30 天内合并 PR
- 38
环境准备
这个项目没有提供开发容器、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 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
SKaiNET-developers/SKaiNET-transformers#483 ·
维护者通常 1 天内回复
-
coding good first issue size:s skill:numerics sub-issue
难度 4/5 3-5 天 新手友好度 55/100
SKaiNET-developers/SKaiNET-transformers#476 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
SKaiNET-developers/SKaiNET-transformers#458 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
SKaiNET-developers/SKaiNET-transformers#410 · 3 条评论 ·
维护者通常 1 天内回复
查看 SKaiNET-developers/SKaiNET-transformers 的全部 Issue
相似的 Issue
-
enhancement triaged
难度 1/5 1 小时以内 新手友好度 63/100
维护者通常 1 天内回复
-
bug follow-up
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug 🐞 CI/CD ⚒️
难度 2/5 1-3 小时 新手友好度 78/100
valkey-io/valkey-glide#7370 ·
维护者通常 1 天内回复
-
binding:web core docs p3
难度 2/5 1-3 小时 新手友好度 85/100
RunanywhereAI/runanywhere-sdks#1123 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
openai/openai-java#1202 ·
维护者通常 1 天内回复