Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
gupta-abhay committed Aug 13, 2024
1 parent e207a02 commit 97f06be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llmfoundry/models/hf/hf_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
List,
Optional,
Tuple,
Type,
Union,
)

Expand All @@ -27,6 +26,7 @@
PreTrainedModel,
PreTrainedTokenizerBase,
)
from transformers.models.auto.auto_factory import _BaseAutoModelClass

from llmfoundry.metrics import (
DEFAULT_CAUSAL_LM_EVAL_METRICS,
Expand Down Expand Up @@ -194,7 +194,8 @@ def build_inner_model(
config_overrides: Dict[str, Any],
load_in_8bit: bool,
pretrained: bool,
model_cls: Union[Type, Type[PreTrainedModel]] = AutoModelForCausalLM,
model_cls: Union[_BaseAutoModelClass,
PreTrainedModel] = AutoModelForCausalLM,
prepare_for_fsdp: bool = False,
) -> Union[PreTrainedModel, 'PeftModel']:
"""Builds the inner model for the ComposerHFCausalLM.
Expand Down

0 comments on commit 97f06be

Please sign in to comment.