mirror of
https://github.com/modular/skills.git
synced 2026-09-19 03:30:35 +08:00
45ebeac3ee
Rename to import-model MODULAR_ORIG_COMMIT_REV_ID: 6f84066533a40d9143c42813b1a904879fb7c88f
2.9 KiB
2.9 KiB
Universal pitfalls (index)
Find your symptom below, then load the one category file it points to.
Config and registration → pitfalls-config.md
arch.py::namemust matcharchitectures[0]exactlydefault_encodingshould match the Hub checkpoint dtype- Memory estimator reads HF
torch_dtype, not the adapter's post-cast dtype gelu_new≠gelu≠gelu_tanh- Import and config API traps
Weight adapter → pitfalls-weights.md
- Tied embeddings need shared tensor objects
stacked_qkv=Falsekeeps HF's unfused Q/K/V key nameslm_head.weightis the canonical state-dict key — never rename tooutput.weight- Don't trust
strict=Falseweight loads numpy.from_dlpackdoes not support bfloat16- Embedding row-count may exceed
vocab_size
Graph build → pitfalls-graph.md
- Scaffold is not a port
ops.constantrequiresdevice=- Partial-rotary padding is interleaved
ops.sumkeeps the reduced dim- Stack-vs-block residual in recurrent / shared-weight architectures
- Subgraph cache assumes uniform layer shape