mindformers.models

Base Classes

mindformers.models.PreTrainedModel

Base class for all models.

mindformers.models.PretrainedConfig

Base class for all configuration classes.

mindformers.models.PreTrainedTokenizer

Base class for all slow tokenizers.

mindformers.models.PreTrainedTokenizerFast

Base class for all fast tokenizers (wrapping HuggingFace tokenizers library).

mindformers.models.multi_modal.ModalContentTransformTemplate

Base class of modal content transform template.

Llama

mindformers.models.LlamaForCausalLM

Provide llama training loss or logits through network.

mindformers.models.LlamaConfig

Llama config class which defines the model size.

mindformers.models.LlamaTokenizer

Construct a Llama tokenizer based on byte-level Byte-Pair-Encoding.

mindformers.models.LlamaTokenizerFast

Construct a Llama tokenizer.

GLM

mindformers.models.glm2.ChatGLM2ForConditionalGeneration

Provide ChatGLM2 training loss or logits through network.

mindformers.models.glm2.ChatGLM2Config

ChatGLM2 model config class which defines the model size.

mindformers.models.glm2.ChatGLM3Tokenizer

Construct a ChatGLM3 tokenizer.

mindformers.models.glm2.ChatGLM4Tokenizer

Construct a ChatGLM4 tokenizer.