Skip to content

Commit

Permalink
fix inter_size config
Browse files Browse the repository at this point in the history
  • Loading branch information
lzhangzz committed Oct 23, 2024
1 parent 504093a commit 4769ef8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lmdeploy/turbomind/deploy/source_model/deepseek_vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def model_info(self):
'language_config'].get('model_type', None) == 'llama':
model_arg = model_arg['language_config'] # depseek-vl
num_layer = model_arg['num_hidden_layers']
hidden_units = model_arg['hidden_size']
hidden_units = model_arg.get('hidden_size', 4096)
inter_size = model_arg.get('intermediate_size', 11008)
norm_eps = model_arg.get('rms_norm_eps', 1e-06)
attn_head_num = model_arg.get('num_attention_heads', 32)
if 'num_key_value_heads' in model_arg:
Expand All @@ -71,6 +72,7 @@ def model_info(self):
head_num=attn_head_num,
kv_head_num=kv_head_num,
hidden_units=hidden_units,
inter_size=inter_size,
rope_theta=rope_theta,
max_position_embeddings=max_position_embeddings,
use_dynamic_ntk=use_dynamic_ntk,
Expand Down
2 changes: 2 additions & 0 deletions lmdeploy/turbomind/deploy/source_model/internvl.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def model_info(self):
num_layer = model_arg['num_hidden_layers']
norm_eps = model_arg['rms_norm_eps']
hidden_units = model_arg['hidden_size']
inter_size = model_arg['intermediate_size']
attn_head_num = model_arg['num_attention_heads']
if 'num_key_value_heads' in model_arg:
kv_head_num = model_arg['num_key_value_heads']
Expand All @@ -82,6 +83,7 @@ def model_info(self):
return dict(num_layer=num_layer,
norm_eps=norm_eps,
hidden_units=hidden_units,
inter_size=inter_size,
head_num=attn_head_num,
kv_head_num=kv_head_num,
rope_theta=rope_theta,
Expand Down

0 comments on commit 4769ef8

Please sign in to comment.