Add support for Gemma 4
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- kotlin
- Lĩnh vực
- ai-infra-agents
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[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
- Ngôn ngữ chính
- Kotlin
- Star
- 8
- Fork
- 3
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 48
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SKaiNET-developers/SKaiNET-transformers
-
documentation good first issue size:xs skill:docs sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SKaiNET-developers/SKaiNET-transformers#478 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement skill:kotlin-core
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
SKaiNET-developers/SKaiNET-transformers#502 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
SKaiNET-developers/SKaiNET-transformers#483 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
coding good first issue size:s skill:kotlin-core sub-issue
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 64/100
SKaiNET-developers/SKaiNET-transformers#477 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
coding good first issue size:s skill:numerics sub-issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
SKaiNET-developers/SKaiNET-transformers#476 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SKaiNET-developers/SKaiNET-transformers
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
coding size:s skill:kotlin-core sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
SKaiNET-developers/SKaiNET#1421 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
intellij-elixir/intellij-elixir#4492 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[UI Bug] Home navigation button not selected after pressing Back from Mix, Library, or SearchĐang mởbug:unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
maxrave-dev/SimpMusic#2714 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày