[Proposal] MiniCPM adapter (MiniCPMForCausalLM) — I'm working on it
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Proposal
Add a TransformerBridge architecture adapter for MiniCPM (MiniCPMForCausalLM, model_type: minicpm, loaded via trust_remote_code). I'm working on this and will open a PR against dev.
Motivation
MiniCPMForCausalLM is listed in the architecture gap registry (71 models, ~928k downloads, relevancy 69.7) and isn't in the adapter factory yet. No existing issue or PR covers it.
Pitch
Scope: dense MiniCPM checkpoints only.
Validation checkpoints:
openbmb/MiniCPM4-0.5B(primary)openbmb/MiniCPM-1B-sft-bf16(if it fits my hardware; CPU only)
The architecture is Llama-shaped (RMSNorm, RoPE/LongRoPE, GQA, gated SiLU MLP, tied embeddings) with three µP-style scalings, which map onto existing Granite-adapter machinery:
scale_emb: embedding output multiplierscale_depth / sqrt(num_hidden_layers): residual-branch multiplierhidden_size / dim_model_base: hidden state divided beforelm_head(logit scaling)
Under transformers v5 the remote code needs a few loading-time patches, handled in the adapter's prepare_loading / prepare_model the same way the Baichuan and InternLM2 adapters do:
is_torch_fx_availablewas removed fromtransformers.utils.import_utilsand the remote code still imports it._tied_weights_keysis the v4 list form; v5 expects a dict.- The rotary buffers (
inv_freq,cos_cached,sin_cached) are non-persistent and come out of v5 loading uninitialized. The model still runs but produces garbage, so they're recomputed after load. forwardraises ifuse_cache=Truewithout aCacheobject.
With those fixes, MiniCPM4-0.5B loads and generates correctly on transformers 5.8.1.
Out of scope:
- MiniCPM4-8B / MiniCPM4.1-8B: sparse (InfLLM-v2) attention
- MiniCPM3 (
MiniCPM3ForCausalLM): a different class with MLA attention - MiniCPM-S and BitCPM variants: not validated
Alternatives
Waiting for upstream to update the remote code for v5. The patches are small and isolated, so I'd rather not block on that.
Checklist
- I have checked that there is no similar issue in the repo (required)
- Ngôn ngữ chính
- Python
- Star
- 3.9k
- Fork
- 708
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 87
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
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 TransformerLensOrg/TransformerLens
-
[Bug Report] test_faithfulness_recovery_is_graded_not_binary passes or fails on the sign of float32 roundingCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
TransformerLensOrg/TransformerLens#1993 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug Report] `TransformerBridge.boot_*` methods are invisible to static type checkersCó thể đã có người làm @koriyoshi2041 đã nhận 2 ngày trước. Đang mởbug complexity-simple TransformerBridge
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
TransformerLensOrg/TransformerLens#1980 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug Report] detect_head fails with a list of sequences and a custom tensor detection patternCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug complexity-moderate TransformerBridge
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
TransformerLensOrg/TransformerLens#1979 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Proposal] Pretrained J++ lenses through JacobianLens: artifact provenance and filtered readoutsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
TransformerLensOrg/TransformerLens#1991 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Proposal] Demo or helper for statistical audits of activation-patching results on TransformerBridgeĐang mởcomplexity-moderate enhancement TransformerBridge
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
TransformerLensOrg/TransformerLens#1988 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TransformerLensOrg/TransformerLens
Issue tương tự
-
docs size:S
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/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 74/100
strawberry-graphql/strawberry#4794 ·
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 78/100
dataforgoodfr/cetolog#21 ·
-
security_citations_test fails against ecc 2026.11.6: SECURITY.md quotes ecc v2026.11.2's linesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
btclib-org/btclib#2932 ·
Maintainer thường phản hồi trong vòng 1 ngày