See https://github.com/GeorgeLuImmortal/DocLLM_reimplementation/