Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add support for Gemma 4

Đang mở
#32 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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; kgemma differentiates at runtime via model_type in config.json
  • InferenceRuntime.generate(...) API stays generic — new Gemma4Runtime plugs 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)
  • kgemma CLI 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 Support
  • ISSUE-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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SKaiNET-developers/SKaiNET-transformers

Tất cả issue của SKaiNET-developers/SKaiNET-transformers

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.