Git Product home page Git Product logo

Comments (5)

shenlei1020 avatar shenlei1020 commented on July 23, 2024

transformers版本是多少?

from bcembedding.

Anooyman avatar Anooyman commented on July 23, 2024

hi @shenlei1020 , transformers 的版本是 4.38.2

from bcembedding.

shenlei1020 avatar shenlei1020 commented on July 23, 2024

不超过4.37,建议用4.36

from bcembedding.

Anooyman avatar Anooyman commented on July 23, 2024
Some weights of XLMRobertaForSequenceClassification were not initialized from the model checkpoint at bce-embedding-base_v1 and are newly initialized: ['classifier.out_proj.bias', 'classifier.dense.weight', 'classifier.dense.bias', 'classifier.out_proj.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[8], line 28
     26 # get embeddings
     27 outputs = embedding_model(**inputs_on_device, return_dict=True)
---> 28 embeddings = outputs.last_hidden_state[:, 0]  # cls pooler
     29 embeddings = embeddings / embeddings.norm(dim=1, keepdim=True)  # normalize

AttributeError: 'SequenceClassifierOutput' object has no attribute 'last_hidden_state'

还是同样的 error

from bcembedding.

Anooyman avatar Anooyman commented on July 23, 2024

hi @shenlei1020 , 可以帮忙看一下吗?已经更换了版本但是依然报错

from bcembedding.

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.