MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / update_model_config

Function update_model_config

verl/verl/utils/model.py:61–71  ·  view source on GitHub ↗

Update the module config with the override_config_kwargs. Args: module_config: The module config from Huggingface Transformers. override_config_kwargs: The kwargs to override the module config.

(module_config, override_config_kwargs)

Source from the content-addressed store, hash-verified

59
60
61def update_model_config(module_config, override_config_kwargs):
62 """Update the module config with the override_config_kwargs.
63 Args:
64 module_config: The module config from Huggingface Transformers.
65 override_config_kwargs: The kwargs to override the module config.
66 """
67 for key, val in override_config_kwargs.items():
68 if isinstance(val, dict):
69 update_model_config(getattr(module_config, key), val)
70 else:
71 setattr(module_config, key, val)
72
73
74def get_huggingface_actor_config(model_name: str, override_config_kwargs=None, trust_remote_code=False) -> dict:

Callers 5

test_update_model_configFunction · 0.90
__post_init__Method · 0.90

Calls

no outgoing calls

Tested by 1

test_update_model_configFunction · 0.72