Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Lane 4 · kotlin-core] tokenizer.json parity — gated parity test replaying the goldens through both tokenizer.json entry points

オープン
#477 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
64/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
kotlin
領域
testing

調査の方向性

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 の本文から書いたものです。

説明

coding good first issue size:s skill:kotlin-core sub-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

  1. Copy the self-skip pattern of Gemma4TokenizerParityTest.kt into a new llm-core/src/jvmTest/kotlin/sk/ainet/apps/llm/tokenizer/TokenizerJsonGoldenParityTest.kt.
  2. Fixture location: $TOKENIZER_GOLDEN_FIXTURES_DIR/<family>/tokenizer.json (environment variable; skip with a printed notice when unset). Add a Gradle task downloadTokenizerGoldenFixtures in llm-core/build.gradle.kts that reads each golden's repo/revision/path, downloads the file from the Hub resolve URL (honouring HF_TOKEN for gated repos) into build/test-fixtures/tokenizer-goldens/<family>/, and checks the sha256. Point the test at that directory by default.
  3. For every golden and for both entry points — TokenizerFactory.fromTokenizerJsonString and GGUFTokenizer.fromTokenizerJson — assert either (a) every case's encode(text) == ids, or (b) the entry point throws UnsupportedTokenizerException (allowed only for fromTokenizerJsonString, see the fail-fast lane). Any other exception is a failure. The assertion message prints text, expected ids, expected token strings and actual ids.
  4. 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.
  5. Run ./gradlew :llm-core:downloadTokenizerGoldenFixtures :llm-core:jvmTest --tests '*TokenizerJsonGoldenParityTest*'; add the task to the smoke-reference.yml workflow'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
平均マージ
12時間 43分
マージ済み PR(30日)
39

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SKaiNET-developers/SKaiNET-transformers のほかの issue

SKaiNET-developers/SKaiNET-transformers の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。