OzzyGT HF Staff commited on
Commit
339f648
·
verified ·
1 Parent(s): d12af3c

Upload 8 files

Browse files
transformer/modeling_minimax_h3_pruned.py CHANGED
@@ -112,6 +112,11 @@ class MiniMaxH3PrunedTransformer3DModel(MiniMaxH3Transformer3DModel):
112
  final_norm_eps: float = 1e-5,
113
  adaln_curve_grid: int = 1025,
114
  adaln_basis_dim: int = 2688,
 
 
 
 
 
115
  ) -> None:
116
  super().__init__(
117
  hidden_size=hidden_size,
 
112
  final_norm_eps: float = 1e-5,
113
  adaln_curve_grid: int = 1025,
114
  adaln_basis_dim: int = 2688,
115
+ # `config.json` carries `auto_map` so `AutoModel` can resolve this class through
116
+ # `trust_remote_code`. `ConfigMixin.extract_init_dict` drops `_`-prefixed keys and
117
+ # `quantization_config` before matching the config against `__init__`, but not
118
+ # `auto_map`, so it has to be accepted here or every load warns that it is unexpected.
119
+ auto_map: dict[str, str] | None = None,
120
  ) -> None:
121
  super().__init__(
122
  hidden_size=hidden_size,
transformer_ref/modeling_minimax_h3_pruned.py CHANGED
@@ -112,6 +112,11 @@ class MiniMaxH3PrunedTransformer3DModel(MiniMaxH3Transformer3DModel):
112
  final_norm_eps: float = 1e-5,
113
  adaln_curve_grid: int = 1025,
114
  adaln_basis_dim: int = 2688,
 
 
 
 
 
115
  ) -> None:
116
  super().__init__(
117
  hidden_size=hidden_size,
 
112
  final_norm_eps: float = 1e-5,
113
  adaln_curve_grid: int = 1025,
114
  adaln_basis_dim: int = 2688,
115
+ # `config.json` carries `auto_map` so `AutoModel` can resolve this class through
116
+ # `trust_remote_code`. `ConfigMixin.extract_init_dict` drops `_`-prefixed keys and
117
+ # `quantization_config` before matching the config against `__init__`, but not
118
+ # `auto_map`, so it has to be accepted here or every load warns that it is unexpected.
119
+ auto_map: dict[str, str] | None = None,
120
  ) -> None:
121
  super().__init__(
122
  hidden_size=hidden_size,