[Proposal] MiniCPM adapter (MiniCPMForCausalLM) — I'm working on it
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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)
- Lenguaje dominante
- Python
- Estrellas
- 3.9k
- Forks
- 708
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 87
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TransformerLensOrg/TransformerLens
-
[Bug Report] test_faithfulness_recovery_is_graded_not_binary passes or fails on the sign of float32 roundingPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
TransformerLensOrg/TransformerLens#1993 ·
Los mantenedores suelen responder en 1 día
-
[Bug Report] `TransformerBridge.boot_*` methods are invisible to static type checkersPosiblemente ocupada @koriyoshi2041 la tomó hace 2 días. Abiertobug complexity-simple TransformerBridge
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
TransformerLensOrg/TransformerLens#1980 ·
Los mantenedores suelen responder en 1 día
-
[Bug Report] detect_head fails with a list of sequences and a custom tensor detection patternPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug complexity-moderate TransformerBridge
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
TransformerLensOrg/TransformerLens#1979 ·
Los mantenedores suelen responder en 1 día
-
[Proposal] Pretrained J++ lenses through JacobianLens: artifact provenance and filtered readoutsAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
TransformerLensOrg/TransformerLens#1991 ·
Los mantenedores suelen responder en 1 día
-
[Proposal] Demo or helper for statistical audits of activation-patching results on TransformerBridgeAbiertocomplexity-moderate enhancement TransformerBridge
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
TransformerLensOrg/TransformerLens#1988 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de TransformerLensOrg/TransformerLens
Issues similares
-
docs size:S
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
strawberry-graphql/strawberry#4794 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dataforgoodfr/cetolog#21 ·
-
security_citations_test fails against ecc 2026.11.6: SECURITY.md quotes ecc v2026.11.2's linesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
btclib-org/btclib#2932 ·
Los mantenedores suelen responder en 1 día