tewth commited on
Commit
9835499
·
verified ·
1 Parent(s): fcb5093

Fix AIMv2 checkpoint/config compatibility with custom HF code

Browse files

This PR makes the uploaded checkpoint consistent with the custom `modeling_aimv2.py` implementation shipped in the repository.

- remap tensor names in `model.safetensors` to match `AIMv2Model.state_dict()`
- update `config.json` so `architectures` and `model_type` align with the shipped config/model classes

Without these changes, loading via `AutoModel.from_pretrained(..., trust_remote_code=True)` initializes most model weights from scratch instead of loading the published checkpoint.

Files changed (2) hide show
  1. config.json +2 -2
  2. model.safetensors +2 -2
config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "architectures": [
3
- "Aimv2VisionModel"
4
  ],
5
  "attention_dropout": 0.0,
6
  "auto_map": {
@@ -15,7 +15,7 @@
15
  "intermediate_size": 2816,
16
  "is_native": false,
17
  "mlp_bias": false,
18
- "model_type": "aimv2_vision_model",
19
  "num_attention_heads": 8,
20
  "num_channels": 3,
21
  "num_hidden_layers": 24,
 
1
  {
2
  "architectures": [
3
+ "AIMv2Model"
4
  ],
5
  "attention_dropout": 0.0,
6
  "auto_map": {
 
15
  "intermediate_size": 2816,
16
  "is_native": false,
17
  "mlp_bias": false,
18
+ "model_type": "aimv2",
19
  "num_attention_heads": 8,
20
  "num_channels": 3,
21
  "num_hidden_layers": 24,
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7d28174ebb3d01b21053827e27e8e9e59960f0ef2907298b977a1da56f9e3982
3
- size 1236816248
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d467ee5b52efcfed8bc18fe10e63879d049a03ed9adbd2529a4657f32355ff2
3
+ size 1236809360