Giter VIP home page Giter VIP logo

Comments (6)

arks22 avatar arks22 commented on September 8, 2024 2

@NanBorui

This issue arises due to a version mismatch in huggingface/transformers. The n_ctx attribute has been either removed or altered in the newer versions of transformers, which is causing errors in this repository that uses an older version.

As specified in conda_env.yml, installing transformers==4.5.1 should resolve this issue.

If that's not feasible, you might be able to solve it by manually altering n_ctx, referencing this commit:

huggingface/transformers@5b45422.

from decision-transformer.

yangfan293 avatar yangfan293 commented on September 8, 2024

Hello, I also met the same problem, may I ask you how to solve it?

from decision-transformer.

NanBorui avatar NanBorui commented on September 8, 2024

May I know how you solved this problem

from decision-transformer.

feifei-feifei-hub avatar feifei-feifei-hub commented on September 8, 2024

When I install transformers==4.5.1, another mistake happened "packaging.version.InvalidVersion: Invalid version: '0.10.1,<0.11'". And when I change transformers version to 4.4.2, the problem of "packaging.version" solved, but the ['n_ctx'] mistake is still alive.

from decision-transformer.

lcjr86 avatar lcjr86 commented on September 8, 2024

@feifei-feifei-hub try version transformers=4.12.5

from decision-transformer.

Patricia1019 avatar Patricia1019 commented on September 8, 2024

if you are using a higher version of Transformers, change n_ctx to n_positions can solve this problem

from decision-transformer.

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.