MCPcopy Create free account
hub / github.com/bruno686/VisPlay / is_encoder_decoder

Function is_encoder_decoder

config.py:232–238  ·  view source on GitHub ↗

Detect if the model with this config is used as an encoder/decoder.

(config: PretrainedConfig)

Source from the content-addressed store, hash-verified

230
231
232def is_encoder_decoder(config: PretrainedConfig) -> bool:
233 """Detect if the model with this config is used as an encoder/decoder."""
234 text_config = getattr(config, "text_config", None)
235 if text_config is not None:
236 return is_encoder_decoder(text_config)
237
238 return getattr(config, "is_encoder_decoder", False)
239
240
241def get_config(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected