Text Generation
Transformers
PyTorch
mpt
Composer
MosaicML
llm-foundry
custom_code
text-generation-inference
mpt-7b-chat / hf_t5.py
irenedea's picture
LLM-foundry update March 26, 2024 23:50:31
ab2b3bb verified
raw
history blame
398 Bytes
"""Implements a Hugging Face T5 wrapped inside a :class:`.ComposerModel`."""
from __future__ import annotations
from typing import Mapping
from transformers import AutoConfig, PreTrainedTokenizerBase, T5ForConditionalGeneration
from .hf_fsdp import hf_get_init_device
from .model_wrapper import HuggingFaceModelWithFSDP
from .utils import init_empty_weights
from .warnings import experimental_class