Add support for Gemma 4
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- kotlin
調査の方向性
Start with the Gemma3n implementation and the listed child issue files, ISSUE-skainet-gemma4-text-only.md and ISSUE-skainet-gemma4-multimodal.md, to map existing runtime entry points and split the work into milestones. The parent issue defines end-to-end inference, CLI detection, backward compatibility, tests, and attribution as acceptance criteria; its scope spans model loading, attention, and multimodal capabilities.
索引モデルが issue の本文から書いたものです。
説明
[Parent] Gemma 4 Support for SKaiNET-transformers
Summary
Add full Gemma 4 model family support to SKaiNET-transformers, starting with text-only inference and progressing to multimodal capabilities. Gemma 4 introduces hybrid attention (sliding + global), proportional RoPE (p-RoPE), Per-Layer Embeddings (PLE), new control tokens, and (optionally) Mixture-of-Experts — all requiring new config parsing, weight loading, prompt formatting, and runtime extensions beyond the existing Gemma3n implementation.
Motivation
Gemma 4 (Apache-2.0) offers up to 256K context, on-device efficiency via PLE, and broad model sizes (E2B, E4B, 31B dense; 26B A4B MoE). Supporting it positions SKaiNET-transformers as a competitive Kotlin Multiplatform inference runtime for the latest open models.
Scope
This parent issue tracks the overall Gemma 4 integration. Work is split into child issues:
- Text-Only Support — Config, weight loading, tokenizer, prompt formatter, hybrid attention, kgemma CLI integration, tests
- Multimodal & Advanced Features — Vision/audio encoders, MoE dispatcher, multimodal prompt handling, fine-tuning adapter ingestion
Key Architectural Decisions
- Gemma3n code path remains untouched;
kgemmadifferentiates at runtime viamodel_typeinconfig.json InferenceRuntime.generate(...)API stays generic — newGemma4Runtimeplugs into existing call sites- SafeTensors (single + sharded) and GGUF loading paths are both required
- KV-cache compression (TurboQuant) integration planned for long-context performance phase
Acceptance Criteria
- Gemma 4 E2B and E4B models load and run text inference end-to-end from HF SafeTensors
- Existing Gemma3n functionality is unaffected (backward compatibility)
-
kgemmaCLI auto-detects Gemma 4 vs Gemma3n based on model artifacts - CI passes with new Gemma 4 test suite (unit, integration, smoke)
- Multimodal roadmap is outlined with clear milestones
- Apache-2.0 license attribution and responsible-use references are documented
Child Issues
ISSUE-skainet-gemma4-text-only.md— Text-Only SupportISSUE-skainet-gemma4-multimodal.md— Multimodal & Advanced Features
References
- 主要言語
- Kotlin
- スター
- 8
- フォーク
- 3
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 48
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
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 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
documentation importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
enorm-labs/event-junkie#3614 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
InsertKoinIO/koin#2477 ·