Git Product home page Git Product logo

Comments (7)

sebastianruder avatar sebastianruder commented on July 30, 2024

Thanks for the question! There is an in the squad_metrics.py script of HuggingFace Transformers that does not work well for Chinese. Specifically, as Chinese doesn't use spaces, we don't need to execute the get_final_text function in this line. If you set final_text = tok_text instead only for Chinese, then you should get the same scores.

from xtreme.

hit-computer avatar hit-computer commented on July 30, 2024

@sebastianruder Thank you very much!

from xtreme.

lixin4ever avatar lixin4ever commented on July 30, 2024

@hit-computer hello, can you share which lines in evaluate_mlqa.py did you change to obtain the normal Chinese results? Just encountered the same problem on zh ):

from xtreme.

ruixiangcui avatar ruixiangcui commented on July 30, 2024

@sebastianruder @hit-computer After I set final_text = tok_text in squad_metrics.py, and ran predict_qa.py and eval_qa.py again, I still got the same results for Chinese on MLQA. Is there anything else I am missing? If I look at the predictions, most of them are very long, almost directly copying-pasting the context.
{"exact_match": 4.944520147946272, "f1": 18.297195642566766}

from xtreme.

lixin4ever avatar lixin4ever commented on July 30, 2024

@sebastianruder @hit-computer After I set final_text = tok_text in squad_metrics.py, and ran predict_qa.py and eval_qa.py again, I still got the same results for Chinese on MLQA. Is there anything else I am missing? If I look at the predictions, most of them are very long, almost directly copying-pasting the context.
{"exact_match": 4.944520147946272, "f1": 18.297195642566766}

+1

from xtreme.

ruixiangcui avatar ruixiangcui commented on July 30, 2024

@lixin4ever It works for me now. To evaluate ZH, we have to first delete this line, and then add final_text = tok_text at line 514. After modifying squad_metrics.py, run predict_qa.py to get the updated predicted file, and then we can evaluate it again.

from xtreme.

lixin4ever avatar lixin4ever commented on July 30, 2024

@ruixiangcui It also works for me. Thanks.

from xtreme.

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.