Missing sliding-window attention configuration in BLT entropy patcher
Hi, thanks for providing the Hugging Face conversion of BLT!
While using itazap/blt-1b-hf, we noticed that the entropy patcher appears to be missing the 512-token sliding-window attention used by the original BLT entropy model.
The original facebook/blt-entropy checkpoint specifies:
"attn_bias_type": "local_block_causal",
"sliding_window": 512
but these fields are not preserved in the current BltPatcherConfig. As a result, the Transformers implementation uses an unbounded causal mask for the entropy patcher.
This has a substantial effect for inputs longer than 512 bytes. At the shipped patching threshold, we observe approximately 1.15 bytes/patch with the current conversion, compared with 4.07 bytes/patch after restoring the 512-token sliding window. The latter closely matches the native facebookresearch/blt implementation (4.0716 vs. 4.0710 bytes/patch on the same evaluation data).
I opened a Transformers issue with the full analysis, reproduction code, and comparison against the reference implementation:
https://github.com/huggingface/transformers/issues/49185
Since this also requires preserving the sliding-window configuration in the converted checkpoint, I wanted to bring it to your attention here as well. Would it be possible to update the model configuration once the corresponding Transformers-side fix is available?
Thanks!