lightonai / RITA

RITA is a family of autoregressive protein models, developed by LightOn in collaboration with the OATML group at Oxford and the Debora Marks Lab at Harvard.
MIT License
88 stars 8 forks source link

Cannot run pipeline to generate sequences #9

Closed yzhang-github-pub closed 1 year ago

yzhang-github-pub commented 1 year ago

Dear Author,

I followed the example code using pipeline: rita_gen = pipeline('text-generation', model=model, tokenizer=tokenizer) sequences = rita_gen("MAB", max_length=20, do_sample=True, top_k=950, repetition_penalty=1.2, num_return_sequences=2, eos_token_id=2)

I got: The model 'RITAModelForCausalLM' is not supported for text-generation. Supported models are ['BartForCausalLM', 'BertLMHeadModel', 'BertGenerationDecoder', 'BigBirdForCausalLM', 'B......'

My transformers version is 4.22.0.dev0.

Please help. Thanks.

DanielHesslow commented 1 year ago

This warning is expected, the generation should nevertheless complete correctly. It's just a HF warning about our model not being part of the main repo.

Complete working example on google colab: https://colab.research.google.com/drive/16GO9fhJwCjcrFBL3MrGHsa9fyBAgth2n?usp=sharing

pjkearns commented 1 year ago

This is a version issue with the transformers/tokenizers package. I had this issue with the newer versions of transformers, but solved it by reverting to transformers==4.20.1