Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
molbap committed Oct 11, 2024
1 parent 35ea3cc commit ab79d0e
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/transformers/models/molmo/convert_molmo_weights_to_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,7 @@ def write_model(
# TODO adapt this depending on model variants
config = MolmoConfig.from_text_vision_configs(text_config=text_config, vision_config=vision_config)

config.initializer_range = 0.02

config.vision_config.hidden_size = 1024
config.vision_config.num_attention_heads = 32
config.vision_config.intermediate_size = 4096
config.vision_config.num_hidden_layers = 23
config.vision_config.num_image_positions = 577

config.text_config.hidden_size = 3584
config.text_config.num_key_value_heads = 4
config.text_config.num_attention_heads = 28
config.text_config.num_hidden_layers = 28
config.text_config.head_dim = 128
config.text_config.vocab_size = 152064
config.text_config.additional_vocab_size = 128
config.text_config.intermediate_size = 37888

# config = MolmoConfig(vision_config=vision_config, text_config=text_config, torch_dtype=torch_dtype)
# config.architectures = ["MolmoForConditionalGeneration"]
# config.save_pretrained(model_path)
Expand Down

0 comments on commit ab79d0e

Please sign in to comment.