Back Home

GitHub Repo

Transformers Community Reports LLMDet Weight-Sharing Bug That May Shift Detection Boxes

A report posted on October 12 says MM Grounding DINO and LLMDet may ignore configuration during loading and bind detection heads from different decoder layers to the same weights. It includes reproduction code and coordinate comparisons, but maintainers have not confirmed the issue, issued an official fix, or provided a full accuracy evaluation.

prayitno from Los Angeles, USA · CC BY 2.0 · Image source
zh-Hant

On October 12, the Transformers community reported an object detection model loading issue: the MM Grounding DINO classes may bind the bounding box and classification heads of every decoder layer to layer zero, even when the model configuration explicitly requires each layer to be independent. The reporter used Transformers 5.18.0 and noted that 5.19.0 and the main branch have the same binding behavior. As of the time of review, the issue remained open, with no maintainer confirmation. Issue report

This discrepancy affects the computation graph actually used after the model is loaded. The public configuration for LLMDet tiny has six decoder layers, with both decoder_bbox_embed_share and decoder_cls_embed_share set to false. The model card says LLMDet uses joint training with a large language model to improve open-vocabulary detection, but the released inference checkpoint does not include the language model used for training; inference works the same way as MM Grounding DINO. Model configuration, model card

The reporter compared default loading with results from restoring the checkpoint weights layer by layer, using the cat-and-remote-control image from the model card on CPU in single precision. With default loading, the top edge of one cat’s box fell outside the image, and the bottom edge of another extended beyond the image height. Restoring the detection heads for each layer substantially changed the box coordinates. The author also noted that the classification head has a learnable bias, so sharing it could likewise change scores. This comparison is a single case and cannot be directly translated into an overall accuracy loss. Reproduction code and output

For engineering teams, the report suggests verifying during framework upgrades that weights remain independent as specified in the configuration, and comparing box coordinates and classification scores on fixed images. Based on this report, confirming that a model loads successfully may not be enough to detect a change in its computation graph. Next, teams should watch for maintainer confirmation of the affected version range, a conditional weight-binding fix, and evaluation on a full dataset. The author’s manual restoration of weights is currently only a diagnostic experiment, not an official fix.

Sources

  1. MM Grounding DINO and LLMDet decoder heads incorrectly tied — Issue #49529
  2. LLMDet tiny 模型卡
  3. LLMDet tiny config.json