[CI] Enable test_initialization to run on V1 (#16736)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
+9
-6
@@ -2794,14 +2794,17 @@ def cprofile(save_file: Optional[str] = None, enabled: bool = True):
|
||||
|
||||
# Only relevant for models using ALiBi (e.g, MPT)
|
||||
def check_use_alibi(model_config: ModelConfig) -> bool:
|
||||
return (getattr(model_config.hf_text_config, "alibi", False) # Falcon
|
||||
cfg = model_config.hf_text_config
|
||||
return (getattr(cfg, "alibi", False) # Falcon
|
||||
or ("BloomForCausalLM" in getattr(model_config.hf_config,
|
||||
"architectures", [])) # Bloom
|
||||
or getattr(model_config.hf_text_config, "position_encoding_type",
|
||||
"") == "alibi" # codellm_1b_alibi
|
||||
or
|
||||
(hasattr(model_config.hf_text_config, "attn_config") # MPT
|
||||
and model_config.hf_text_config.attn_config.get("alibi", False)))
|
||||
or getattr(cfg, "position_encoding_type", "") ==
|
||||
"alibi" # codellm_1b_alibi
|
||||
or (hasattr(cfg, "attn_config") # MPT
|
||||
and ((isinstance(cfg.attn_config, dict)
|
||||
and cfg.attn_config.get("alibi", False)) or
|
||||
(not isinstance(cfg.attn_config, dict)
|
||||
and getattr(cfg.attn_config, "alibi", False)))))
|
||||
|
||||
|
||||
def sha256(input) -> int:
|
||||
|
||||
Reference in New Issue
Block a user