Coder Social home page Coder Social logo

Comments (3)

geyingli avatar geyingli commented on August 15, 2024 1

Really appreciate your question. Thank you

The thing is, hugging face implements BERT based on pytorch, but this framework is designed to meet the needs of tensorflow users. So we need to convert the pre-trained model from pytorch supported file into tensorflow supported checkpoint if we wish to use it. Since we haven't considered about this sort of issue in the past, UNIF does not support loading pre-trained model from pytorch checkpoint by now. We will try to implement it in the next a few days and let you know if we make it.

Before then, there is another way to meet this purpose: download the pre-trained model released by hugging face and run the conversion script convert_bert_pytorch_checkpoint_to_original_tf.py. Then run model = uf.BERTClassifier(..., init_checkpoint='./tf_checkpoint_dir') to load.

from unif.

filevich avatar filevich commented on August 15, 2024

thank you very much for your kindness! 😊
And thank you for the framework, very handy. keep it going!

from unif.

geyingli avatar geyingli commented on August 15, 2024

Glad to hear that. I think I will. ^^

from unif.

Related Issues (10)

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.