[bitnet] planesHeadFromEmbedding takes ~45 s single-threaded at load (tied 128k×2560 head) — parallelise, cache or AOT-convert
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- kotlin
- Lĩnh vực
- performance
Hướng nghiên cứu
Start with BitNetWeightLoader.kt, especially planesHeadFromEmbedding, and trace the call into BitNetPlanesTensorData.kt and TernaryCodec.kt. Compare the suggested approaches and identify how to measure the conversion during model loading. Done means the tied head is converted faster or reused on subsequent loads, with the output remaining compatible with the existing lossless requantise path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Loading BitNet b1.58 2B4T (microsoft/bitnet-b1.58-2B-4T-gguf, I2_S) spends about 45 s on a single thread building the two-stage lm_head. The model has a tied head, so BitNetWeightLoader.planesHeadFromEmbedding encodes the 128256 × 2560 token_embd into BITNET_PLANES.
Main-thread stack about 45 s into a load:
at sk.ainet.lang.memory.TernaryCodec.encodeBitNetPlanes(TernaryCodec.kt:220)
at sk.ainet.lang.tensor.data.BitNetPlanesTensorData$Companion.fromFloats(BitNetPlanesTensorData.kt:78)
at sk.ainet.models.bitnet.BitNetWeightLoader.planesHeadFromEmbedding(BitNetWeightLoader.kt:170)
at sk.ainet.models.bitnet.BitNetWeightLoader.loadRuntimeWeights(BitNetWeightLoader.kt:140)
mpstat during load shows one core at 91–100 % and the other three idle for about 40 s.
Setup
Arduino Ventuno Q (QCS8275, 4× Cortex-A78C), Temurin 21, SKaiNET-transformers develop @ a92d65e, engine 0.61.0, skainet-cli.
Suggestions (any one helps)
- Parallelise the encode across rows. The rows are independent; each has its own FP16 scale and planes.
- Cache the encoded head next to the GGUF, keyed by the file's hash, so the second and later loads are instant.
- AOT-convert the head as part of a blueprint or cartridge
convertstep, shipping a GGUF or sidecar withoutput.weightalready in planes form. The lossless requantise path for files that haveoutput.weightalready exists.
On edge boards this 45 s dominates time-to-first-token, and it runs on every start.
- Ngôn ngữ chính
- Kotlin
- Star
- 8
- Fork
- 3
- Merge trung bình
- 12 giờ 43 phút
- Pull request đã merge (30 ngày)
- 39
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
-
Moonshine streaming: zero-audio frontend context at the utterance start corrupts transcriptsCó thể đã có người làm @michalharakal đã nhận 1 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
SKaiNET-developers/SKaiNET-transformers#500 ·
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ự
-
[Submission] 悠悠有品Đang mởsubmit-adaption submit-adaption-pre
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
BetterAndroid/android-notification-icon-project#763 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
scarif-labs/horus#61 ·
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 87/100
damontecres/Wholphin#2093 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
FossifyOrg/Messages#929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cr:missing-repro cr:platform:android missing-repro platform:android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
software-mansion/react-native-screens#4950 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày