OK, I think I finally figured out what’s going on. There seems to be weird interactions between --model_type roberta, which sets the (position_embeddings) to 512, and --config_name which actually reads the json, which in my case was 514.
So if you don’t give it --config_name, it doesn’t actually set the position_embeddings using the config.json, even though it prints the config.json out, and even though it uses the config.json to set some of the tokenizer stuff.
tl;dr, here is the magic combination of flags, this seems to run through the large lines of oscar.eo.txt without crashing.
CLI:
python run_mlm.py \
    --line_by_line \
    --config_name /home/cleong/projects/personal/colin-summer-2021/EsperBERTo/ \
    --tokenizer_name /home/cleong/projects/personal/colin-summer-2021/EsperBERTo/ \
    --train_file /home/cleong/projects/personal/colin-summer-2021/data/oscar.eo.txt \
    --max_seq_length 512 \
    --do_train \
    --output_dir ./output/test-mlmm

config.json:
{
  "architectures": [
    "RobertaForMaskedLM"
  ],
  "attention_probs_dropout_prob": 0.1,
  "bos_token_id": 0,
  "eos_token_id": 2,
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 768,
  "initializer_range": 0.02,
  "intermediate_size": 3072,
  "layer_norm_eps": 1e-05,
  "max_position_embeddings": 514,
  "model_type": "roberta",
  "num_attention_heads": 12,
  "num_hidden_layers": 6,
  "pad_token_id": 1,
  "type_vocab_size": 1,
  "vocab_size": 52000
}