The provided example doesn't work

#32
by kqsong - opened

Tried to use the provided example, however, it is not work with "text-generate".

Any suggestions?

Microsoft org

Hi. Could you share some more details or error messages you see?

Hi. Could you share some more details or error messages you see?

Error message:

The model 'PhiMoEForCausalLM' is not supported for text-generation. Supported models are ['BartForCausalLM', 'BertLMHeadModel', 'BertGenerationDecoder', 'BigBirdForCausalLM', 'BigBirdPegasusForCausalLM', 'BioGp
tForCausalLM', 'BlenderbotForCausalLM', 'BlenderbotSmallForCausalLM', 'BloomForCausalLM', 'CamembertForCausalLM', 'LlamaForCausalLM', 'CodeGenForCausalLM', 'CohereForCausalLM', 'CpmAntForCausalLM', 'CTRLLMHeadM
odel', 'Data2VecTextForCausalLM', 'DbrxForCausalLM', 'ElectraForCausalLM', 'ErnieForCausalLM', 'FalconForCausalLM', 'FuyuForCausalLM', 'GemmaForCausalLM', 'Gemma2ForCausalLM', 'GitForCausalLM', 'GPT2LMHeadModel
', 'GPT2LMHeadModel', 'GPTBigCodeForCausalLM', 'GPTNeoForCausalLM', 'GPTNeoXForCausalLM', 'GPTNeoXJapaneseForCausalLM', 'GPTJForCausalLM', 'JambaForCausalLM', 'JetMoeForCausalLM', 'LlamaForCausalLM', 'MambaForC
ausalLM', 'MarianForCausalLM', 'MBartForCausalLM', 'MegaForCausalLM', 'MegatronBertForCausalLM', 'MistralForCausalLM', 'MixtralForCausalLM', 'MptForCausalLM', 'MusicgenForCausalLM', 'MusicgenMelodyForCausalLM',
 'MvpForCausalLM', 'OlmoForCausalLM', 'OpenLlamaForCausalLM', 'OpenAIGPTLMHeadModel', 'OPTForCausalLM', 'PegasusForCausalLM', 'PersimmonForCausalLM', 'PhiForCausalLM', 'Phi3ForCausalLM', 'PLBartForCausalLM', 'P
rophetNetForCausalLM', 'QDQBertLMHeadModel', 'Qwen2ForCausalLM', 'Qwen2MoeForCausalLM', 'RecurrentGemmaForCausalLM', 'ReformerModelWithLMHead', 'RemBertForCausalLM', 'RobertaForCausalLM', 'RobertaPreLayerNormFo
rCausalLM', 'RoCBertForCausalLM', 'RoFormerForCausalLM', 'RwkvForCausalLM', 'Speech2Text2ForCausalLM', 'StableLmForCausalLM', 'Starcoder2ForCausalLM', 'TransfoXLLMHeadModel', 'TrOCRForCausalLM', 'WhisperForCaus
alLM', 'XGLMForCausalLM', 'XLMWithLMHeadModel', 'XLMProphetNetForCausalLM', 'XLMRobertaForCausalLM', 'XLMRobertaXLForCausalLM', 'XLNetLMHeadModel', 'XmodForCausalLM'].

I checked the huggingface, there's no official code for the model, but the authors added them to the checkpoint repo.

Hi. Yes, we are working on adding our new model to the transformers library. Until it's merged, please use the model class we shared with the model checkpoint. The provided example should work if you downloaded the model and class file (which is done automatically) in the same directory.

Hi. Yes, we are working on adding our new model to the transformers library. Until it's merged, please use the model class we shared with the model checkpoint. The provided example should work if you downloaded the model and class file (which is done automatically) in the same directory.

I tried to use text-generation with the provided code in the checkpoint repo. I want to do a 32k context length inference. however, it shows OOM for 8xH100 GPUs. Can you please provide any vLLM or TensorRT support or MII / Deepspeed inference example so that I can run through the code for a long context?

Thanks a lot.

Microsoft org

@kqsong If you want to do 32K context length inference, an alternative way is to get an endpoint on Azure AI https://aka.ms/try-phi3.5moe

Sign up or log in to comment