Giter Site home page Giter Site logo

Comments (6)

jayded avatar jayded commented on September 24, 2024 1

I can confirm that this affects run_summarization.py and is inconsistent with the semantics of other Huggingface configs.

from primer.

Wendy-Xiao avatar Wendy-Xiao commented on September 24, 2024 1

Hi John and Jay,

Thanks for pointing out the issue. It is not intentional to set max_position_embedding to be 1024, it's just set by default.

I have not used run_summarization.py before, so I didn't know that in that script they treat max_position_embedding as the maximum position embedding size for the encoder, which is specified as max_encoder_position_embeddings in our case.

I'll update it in the config files, to make it consistent with the script.

from primer.

JohnGiorgi avatar JohnGiorgi commented on September 24, 2024

Was able to address it temporarily by doing:

from transformers import AutoConfig

config = AutoConfig.from_pretrained("allenai/PRIMERA")
config.max_position_embeddings = 4096
config.save_pretrained("allenai/PRIMERA-fixed")

and then passing "allenai/PRIMERA-fixed" to the run_*.py scripts via the --config_name flag.

from primer.

JohnGiorgi avatar JohnGiorgi commented on September 24, 2024

Awesome, thank you @Wendy-Xiao!

from primer.

JohnGiorgi avatar JohnGiorgi commented on September 24, 2024

Hi @Wendy-Xiao I see this is fixed for base PRIMERA model. Would you mind making the same change to the fine-tuned models? (e.g. multi-news, multi-x-science, etc.). Nvm I made PRs for each model they would just need to be merged!

from primer.

JohnGiorgi avatar JohnGiorgi commented on September 24, 2024

Closing this as it was addressed, thank you @Wendy-Xiao!

from primer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.