Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: KeyError: 'sdpa' #13

Open
17Reset opened this issue Dec 11, 2024 · 0 comments
Open

Error: KeyError: 'sdpa' #13

17Reset opened this issue Dec 11, 2024 · 0 comments

Comments

@17Reset
Copy link

17Reset commented Dec 11, 2024

(e2m_venv) xlab@xlab:/mnt/E2M$ marker_single "FABulous An Embedded FPGA Framework.pdf" /output --batch_multiplier 2 --max_pages 10
Loaded detection model vikp/surya_det3 on device cuda with dtype torch.float16
Loaded detection model vikp/surya_layout3 on device cuda with dtype torch.float16
Traceback (most recent call last):
  File "/mnt/E2M/e2m_venv/bin/marker_single", line 8, in <module>
    sys.exit(main())
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/convert_single.py", line 31, in main
    model_lst = load_all_models()
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/marker/models.py", line 74, in load_all_models
    order = setup_order_model(device, dtype)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/marker/models.py", line 61, in setup_order_model
    model = load_order_model()
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/surya/model/ordering/model.py", line 27, in load_model
    model = OrderVisionEncoderDecoderModel.from_pretrained(checkpoint, config=config, torch_dtype=dtype)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py", line 376, in from_pretrained
    return super().from_pretrained(pretrained_model_name_or_path, *model_args, **kwargs)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4130, in from_pretrained
    model = cls(config, *model_args, **model_kwargs)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py", line 199, in __init__
    decoder = AutoModelForCausalLM.from_config(config.decoder)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 440, in from_config
    return model_class._from_config(config, **kwargs)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1509, in _from_config
    model = cls(config, **kwargs)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 495, in __init__
    self.model = MBartOrderDecoderWrapper(config)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 480, in __init__
    self.decoder = MBartOrderDecoder(config)
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 294, in __init__
    self.layers = nn.ModuleList([MBartOrderDecoderLayer(config) for _ in range(config.decoder_layers)])
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 294, in <listcomp>
    self.layers = nn.ModuleList([MBartOrderDecoderLayer(config) for _ in range(config.decoder_layers)])
  File "/mnt/E2M/e2m_venv/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 209, in __init__
    self.self_attn = MBART_ATTENTION_CLASSES[config._attn_implementation](
KeyError: 'sdpa'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant