Coder Social home page Coder Social logo

Perplexity about disan HOT 6 CLOSED

taoshen58 avatar taoshen58 commented on September 17, 2024
Perplexity

from disan.

Comments (6)

taoshen58 avatar taoshen58 commented on September 17, 2024 1

I don’t think the perplexity is a evaluation metric for text classification task but language model. If you want the value, you can run the pretrained model and calculate the perplexity. Note that don’t forget to change the total loss (xentropy+l2) to the cross entropy loss only when evaluation.

from disan.

xuy2 avatar xuy2 commented on September 17, 2024

@taoshen58 For perplexity part, it seems that a word embedding matrix should also be multiplied. Which embedding matrix should be used? emb_mat_token or emb_mat_glove

from disan.

taoshen58 avatar taoshen58 commented on September 17, 2024

Hi @xuy2

emb_mat_token includes the words from the training set where the embedding is initialized by glove if the corresponding word exists in the glove, otherwise is initialized by random.

emb_mat_glove is the words from glove where the overlapping words with emb_mat_token have been removed. This mat is certainly initialized by glove.

So, emb_mat_token need fine-tuned during training while the emb_mat_glove is not trainable but useful when testing.

from disan.

xuy2 avatar xuy2 commented on September 17, 2024

@taoshen58 It seems that I'd better use the matrix after generate_embedding_mat function, which includes 406079 words. I'll update the perplexity if my test is finished. Have you ever consider that using the disan model as transfer learning?

from disan.

taoshen58 avatar taoshen58 commented on September 17, 2024

You can reduce the vocabulary size by using the word frequency in your corpus.

Is the transfer learning you mentioned similar to the OpenAI Transformer?

from disan.

xuy2 avatar xuy2 commented on September 17, 2024

https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf
Like this paper.

from disan.

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.