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

Adding Support For Phi Models #1946

Open
dawnik17 opened this issue Jul 7, 2024 · 4 comments
Open

Adding Support For Phi Models #1946

dawnik17 opened this issue Jul 7, 2024 · 4 comments
Labels

Comments

@dawnik17
Copy link

dawnik17 commented Jul 7, 2024

Feature request

Adding support for phi models

Motivation

Currently phi models are not supported in bettertransformer. When trying to load a phi model, it raises NotImplemented error with a list of all the other implemented models here.

Your contribution


@Dev4011
Copy link

Dev4011 commented Jul 10, 2024

Yeah, it would be great if Microsoft Phi3 model can be supported using bettertransformer

@fxmarty
Copy link
Contributor

fxmarty commented Jul 16, 2024

Hi @dawnik17 @Dev4011 Transformers natively support scaled dot product attention operator from pytorch which was previously integrated through bettertransformer: https://github.com/huggingface/transformers/blob/e0dfd7bcaf7ff0723085f23244a755cc2ed92466/src/transformers/models/phi3/modeling_phi3.py#L614

What is not available in Transformers is the support of NestedTensor (or ragged tensor with a single dimension for both batch size/sequence length).

@miaoqiz
Copy link

miaoqiz commented Jul 18, 2024

I tried to use the "main_export()" to export a model, it shows the following error:


ValueError: Trying to export a custom model, but could not find as many custom ONNX configs as the number of submodels to export. Please specifiy the fn_get_submodels argument, that should return a dictionary of submodules with as many items as the p


What can be done to resolve this issue?

@Dev4011
Copy link

Dev4011 commented Jul 22, 2024

@fxmarty so what is the tentative timeline you are considering for supporting Phi3 models via betterTransformers?

@tengomucho tengomucho added the feature-request New feature or request label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants