Defines model types, layer types, attention types, and attention backends for Megatron-LM framework.
# Source: https://github.com/Gen-Verse/OpenClaw-RL | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
import enum
# can we get rid of this?
# it's being used in pipeline schedules
class ModelType(enum.Enum):
"""Model Type
encoder_or_decoder for bert, gpt etc
encoder_and_decoder for multimodal , T5 etc
"""
encoder_or_decoder = 1
@property
def encoder_and_decoder(self):
"""Deprecated property - use encoder_or_decoder instead."""
raise ValueError(
"ModelType.encoder_and_decoder is deprecated. Please use ModelType.encoder_or_decoder "
"instead."
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key