question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

run_lm_finetuning.py does not define a do_lower_case argument

See original GitHub issue

The file references args.do_lower_case, but doesn’t have the corresponding parser.add_argument call.

As an aside, has anyone successfully applied LM fine-tuning for a downstream task (using this code, or maybe using the original tensorflow implementation)? I’m not even sure if the code will run in its current state. And after fixing this issue locally, I’ve had no luck using the output from fine-tuning: I have a model that gets state-of-the-art results when using pre-trained BERT, but after fine-tuning it performs no better than omitting BERT/pre-training entirely! I don’t know whether to suspect that there are might be other bugs in the example code, or if the hyperparameters in the README are just a very poor starting point for what I’m doing.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
nikitakitcommented, Jan 11, 2019

I figured out why I was seeing such poor results while attempting to fine-tune: the example saves model.bert instead of model to pytorch_model.bin, so the resulting file can’t just be zipped up and loaded with from_pretrained.

1reaction
nikitakitcommented, Jan 11, 2019

Thanks for fixing these!

After addressing the save/load mismatch I’m seeing downstream performance comparable to using pre-trained BERT. I just got a big scare when the default log level wasn’t high enough to notify me that weights were being randomly re-initialized instead of loaded from the file I specified. It’s still too early for me to tell if there are actual benefits to fine-tuning, though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discord.py How do i make it so this doesn't convert urls and ...
I would set up a white list of commands you don't want to convert to lowercase. Split the message along spaces. Then you...
Read more >
Lowercase in Python Tutorial - DataCamp
The .lower() method takes no arguments and returns the lowercased strings from the given string by converting each uppercase character to lowercase.
Read more >
Python Lowercase – How to Use the String lower() Function
The lower() method is a string method that returns a new string, completely lowercase. If the original string has uppercase letters, in the...
Read more >
Learn How to Lowercase a String in Python - eduCBA
The lower() function does not have any parameters or arguments. These functions in Python are used to convert the strings to upper or...
Read more >
isupper(), islower(), lower(), upper() in Python and their ...
It converts all lowercase characters to uppercase. If no lowercase characters exist, it returns the original string. It does not take any ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found