crash when running mosaicml/mpt-7b-* models: KeyError: 'attention_mask' · Issue #213 · hyperonym/basaran · GitHub
Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

crash when running mosaicml/mpt-7b-* models: KeyError: 'attention_mask' #213

Open

Description

@tarasglek
from basaran.model import load_model

model = load_model('mosaicml/mpt-7b-storywriter',  trust_remote_code=True, load_in_8bit=True,)

for choice in model("once upon a time"):
    print(choice)
Traceback (most recent call last):
  File "/home/taras/Documents/ctranslate2/basaran/run.py", line 7, in <module>
    for choice in model("once upon a time"):
  File "/home/taras/Documents/ctranslate2/basaran/.venv/lib/python3.9/site-packages/basaran/model.py", line 73, in __call__
    for (
  File "/home/taras/Documents/ctranslate2/basaran/.venv/lib/python3.9/site-packages/basaran/model.py", line 233, in generate
    inputs = self.model.prepare_inputs_for_generation(
  File "/home/taras/.cache/huggingface/modules/transformers_modules/mosaicml/mpt-7b-storywriter/8667424ea9d973d3c01596fcbb86a3a8bc164299/modeling_mpt.py", line 280, in prepare_inputs_for_generation
    attention_mask = kwargs['attention_mask'].bool()
KeyError: 'attention_mask'

Activity

  1. changed the title [-]crash when running storywriter model[/-] [+]crash when running storywriter model: KeyError: 'attention_mask'[/+] on Jun 12, 2023
  2. changed the title [-]crash when running storywriter model: KeyError: 'attention_mask'[/-] [+]crash when running mosaicml/mpt-7b-* models: KeyError: 'attention_mask'[/+] on Jun 12, 2023
  3. tarasglek commented on Jun 12, 2023

    @tarasglek
    Author

    Same thing happens with mosaicml/mpt-7b-instruct

  4. fardeon commented on Jun 13, 2023

    @fardeon
    Member

    It appears that the error originates from the internal code of MPT. We will conduct further testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions