[Lane 2 · kotlin-core] tokenizer.json parity — apply the normalizer block (Replace, Prepend, Sequence, NFC) before pre-tokenization
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 43/100
調査の方向性
Start with SpecialTokenSplitter.kt and the normalizer handling in SentencePieceTokenizer.kt#L382-L391; the issue names both tokenizer factories to update and the existing source sets for platform NFC code. First check the Lane 1 survey for the NFC strategy, then implement the normalizer plumbing while it is open. Run the listed jvmTest and linuxX64Test; done means the three specified normalizers pass, unknown types fail with their names, and the ModernBERT fixture ends with id 3974.
索引モデルが issue の本文から書いたものです。
説明
Sub-issue of #1321 (HF tokenizer.json parity for BPE encoders).
Lane: 2 · Kotlin core
Skill needed: Kotlin Multiplatform (expect/actual or a pure-Kotlin table), Unicode normalization basics. No tensor knowledge.
Size: m (1–2 days; most of it is the NFC implementation and its tests)
Blocked by: the Lane 1 survey (it decides the NFC strategy). Start with the Replace/Sequence plumbing while it is open.
What to do
- Add a small
Normalizerstep tosk.ainet.io.tokenizerthat is built fromtokenizer.json#normalizerand applied to each non-special segment before pre-tokenization (the reference applies it before added-token matching only for tokens withnormalized: true; applying it to the segments between atomic matches is the observable behaviour for the files in the parent). - Support, in this order:
null(no-op),Replace(pattern.String→content;pattern.Regexcan throwUnsupportedTokenizerExceptionwith the pattern in the message),Prepend,Sequence(compose),NFC. Everything else: throwUnsupportedTokenizerExceptionnaming the type — do not silently skip, that is the current bug. - Implement NFC the way Lane 1 recommended. If that is
expect/actual: JVM viajava.text.Normalizer, JS/Wasm vianormalize("NFC"), Kotlin/Native passthrough with a documented warning in the KDoc. Put the per-target code in the existingjvmMain/jsMain/wasmJsMain/native64Mainsource sets ofskainet-io-core. - Wire it into
QwenByteLevelBpeTokenizer.fromTokenizerJsonandSentencePieceTokenizer.fromTokenizerJson; the existingPrependsniffing at SentencePieceTokenizer.kt#L382-L391 should become a consumer of the new step rather than a second parser. - Tests in
commonTest:Replace,Sequence, and NFC on"e\u0301"→"é"(JVM at least; mark the native expectation explicitly). Run./gradlew :skainet-io:skainet-io-core:jvmTest :skainet-io:skainet-io-core:linuxX64Test.
Acceptance
- ModernBERT file: the third fixture text of #1321 (ending in decomposed
e+ U+0301) encodes identically to the reference — last id3974, not299, 136, 212 - Unknown normalizer types fail loudly with the type name in the message
- Tests green on
jvmTestandlinuxX64Test - Result reported back on #1321
Notes
Sibling file to copy the shape from: SpecialTokenSplitter.kt is a small decorator built by the factory from a JSON block — the normalizer is the same pattern one step earlier in the pipeline. Keep the implementation out of QwenByteLevelBpeTokenizer itself so the Metaspace lane can reuse it.
- 主要言語
- Kotlin
- スター
- 52
- フォーク
- 15
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 37
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SKaiNET-developers/SKaiNET のほかの issue
-
coding good first issue platform size:xs skill:js sub-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SKaiNET-developers/SKaiNET#1232 ·
メンテナーはふだん 1 日以内に返信
-
skeep tracking
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
SKaiNET-developers/SKaiNET#1331 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
assessment size:s skill:review sub-issue
難易度 4/5 1〜2日 初心者へのやさしさ 18/100
SKaiNET-developers/SKaiNET#1330 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue size:s skill:docs sub-issue
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
SKaiNET-developers/SKaiNET#1329 ·
メンテナーはふだん 1 日以内に返信
-
coding good first issue size:s skill:kotlin-core sub-issue
難易度 3/5 半日 初心者へのやさしさ 75/100
SKaiNET-developers/SKaiNET#1328 ·
メンテナーはふだん 1 日以内に返信
SKaiNET-developers/SKaiNET の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
damontecres/Wholphin#2069 ·
メンテナーはふだん 1 日以内に返信
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
margelo/react-native-vision-camera#4217 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
saisaharsh3/Leftovers#13 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
navikt/esyfo-narmesteleder#700 ·
メンテナーはふだん 1 日以内に返信
-
[DEV] Update ktlintオープンbackend maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
digitalfabrik/entitlementcard#3183 ·
メンテナーはふだん 7 日以内に返信