Add LWDetr model #40991

Cyrilvallez merged 85 commits into huggingface:main from sbucaille:add_lw_detr
sbucaille
sbucaille sbucaille marked this pull request as draft 272 days ago
sbucaille sbucaille force pushed from 6a4faac2 to 15aa78c4 269 days ago
sbucaille sbucaille marked this pull request as ready for review 269 days ago
sbucaille
sbucaille sbucaille changed the title [WIP] Add LWDetr model Add LWDetr model 269 days ago
github-actions github-actions requested a review from ArthurZucker ArthurZucker 269 days ago
github-actions github-actions requested a review from Rocketknight1 Rocketknight1 269 days ago
sbucaille sbucaille force pushed from f198fbc1 to 03e3d834 265 days ago
yonigozlan
yonigozlan commented on 2025-09-29
yonigozlan
sbucaille sbucaille force pushed from 0c1f23b1 to f35fb75d 243 days ago
sbucaille
yonigozlan
yonigozlan commented on 2025-10-20
sbucaille sbucaille force pushed from f35fb75d to c4f2893b 240 days ago
sbucaille
sbucaille
yonigozlan
yonigozlan approved these changes on 2025-10-29
sbucaille
sbucaille sbucaille force pushed from 814a1916 to 284b51ce 208 days ago
sbucaille sbucaille force pushed from 284b51ce to 47c1cb46 208 days ago
sbucaille feat: add LWDetr model
23631b17
sbucaille fix: changed LwDetrVit base classes from VitDet to ViT
0eb69e6e
sbucaille tests: added tests for LWDetr
12fa5e23
sbucaille refactor: fix all issues and created docs
aceb10c3
sbucaille tests: added missing lw_detr_vit tests
bd48206b
sbucaille docs: add lwdetr docs
06c7d70c
sbucaille fix: fixed implementation error and associated tests
a2ef8c34
sbucaille chore: removed testing lib in imports
9faeaee8
sbucaille refactor: replace LwDetrImageProcessor with DeformableDetrImageProcessor
0fad3404
sbucaille refactor: remove two-stage detection and bounding box reparameterizat…
a89f8f29
sbucaille refactor: rename LwDetrCSPRepLayer to LwDetrC2FLayer
e942891e
sbucaille refactor: introduce LwDetrMLP for feedforward layers in decoder
f9e96317
sbucaille refactor: replace build_position_encoding with LwDetrSinePositionEmbe…
9cf545d6
sbucaille refactor: remove use_cae parameter and related logic from configurati…
199b2bc6
sbucaille refactor: remove unused variables and simplify certain instructions
ab6096f7
sbucaille refactor: removed unnecessary one line instruction method with_pos_embed
b95de124
sbucaille refactor: use llama attention formatting for hidden shape
0af67c2d
sbucaille docs: add comments about group detr
15625a50
sbucaille fix: removed wrong sigmoid and fixed init for class_embed
22d66d2f
sbucaille refactor: removed unused positional embeddings classes and weights fr…
5b7f6570
sbucaille chore: removed unused import
b075292d
sbucaille chore: make style and repo-consistency after positional embeddings re…
d863a68a
sbucaille refactor: removed unused drop path rate
d6fdd91b
sbucaille fix: ingest latest changes from rebase
13ad4a8a
sbucaille fix: attn_implementation setter
8147b456
sbucaille fix: is causal set to False
25fbaab1
sbucaille refactor: renamed ffn to mlp and moved layer norm out of mlp
d5b24a6a
sbucaille fix: check model inputs
fa6deed9
sbucaille fix: moved super init call in LwDetrConfig
75b3f1fc
sbucaille fix: super class in GradientCheckpointingLayer
f998abb9
sbucaille fix: replaced RTDetr occurences by LwDetr in test modeling file
e164b8a9
sbucaille refactor: removed head_mask from LwDetrViT
05afaa7c
sbucaille docs: added release date in docs
ff488212
sbucaille fix: added missing attention mask argument
c627a2a9
sbucaille chore: make style & repo-consistency
755c5b84
sbucaille fix: ensure tensor dtype consistency in loss calculations and test cases
8b72816d
sbucaille docs: fixed model release date
2b9ebffa
sbucaille refactor: removed unnecessary module cloning
6e4f5839
sbucaille tests: added missing _prepare_for_class method and removed batching_e…
97c1d37a
sbucaille tests: added xlarge integration test
abae3759
sbucaille chore: added lw_detr reference in image processing auto
e037e63a
sbucaille chore: removed unnecessary properties from LwDetrConfig
9deff21d
sbucaille fix: fix for latest main changes
be4fc9f1
sbucaille fix: apply modular changes from mail
7556efca
sbucaille docs: update model doc and docstrings
77a94e7b
sbucaille sbucaille force pushed from e462c9ee to 77a94e7b 197 days ago
sbucaille fix: style
fec5db9c
sbucaille
sbucaille fix: update output values in convert script
4cdc807b
stevhliu
stevhliu approved these changes on 2025-12-04
sbucaille feat: added proper last_hidden_states in LwDetrDecoderOutput and sepa…
df6f2eda
yonigozlan
yonigozlan approved these changes on 2025-12-04
Cyrilvallez
Cyrilvallez commented on 2025-12-08
sbucaille fix: guard accelerate imports
138b009c
sbucaille fix: removed LWDetrConfig attribute map and changed LwDetrAttention i…
d71dbb81
sbucaille fix: parameterize amap based on config
f9e60b42
sbucaille fix: remove redundant decorator
635f5279
sbucaille chore: moved LwDetrViT to LwDetr single modular file
eeac74a3
sbucaille fix: remove unnecessary attribute_map in LwDetrViT
514536e9
sbucaille chore: simplified LwDetr modules methods with proper hidden_states re…
e82f6d5f
sbucaille fix: replaced hardcoded value by variable
13e9aa36
sbucaille tests: added VitDet and attention tests
082715b1
sbucaille fix: modular conversion
74c47a73
sbucaille tests: moved LwDetrViT tests to test_modeling_lw_detr file
865739f6
sbucaille
sbucaille docs: add lwdetr advances in docs
dec88cd6
stevhliu
stevhliu approved these changes on 2025-12-10
Cyrilvallez
sbucaille refactor: removed arguments to classes as much as possible and rely o…
b7821a38
sbucaille
ArthurZucker ArthurZucker removed review request from ArthurZucker ArthurZucker 184 days ago
Cyrilvallez Merge branch 'main' into add_lw_detr
c9809f8e
Cyrilvallez
Cyrilvallez commented on 2026-01-08
Cyrilvallez reapply style, remove LlamaAttention inheritance to remove decorator
ad93a7b5
Cyrilvallez
Cyrilvallez
Cyrilvallez commented on 2026-01-08
sbucaille chore: updated licence and year
e5a0446d
sbucaille fix: removed torch.nn.functional from modular
003d63d6
sbucaille docs: removed redundant docstring arguments covered by autodocstring …
99490ca4
sbucaille refactor: removed backbone api statements
11727aba
sbucaille fix: added back num_key_value_groups in LwDetrAttention
8b8feb89
sbucaille chore: removed unnecessary copied from statement
c68e713a
sbucaille chore: moved LwDetrViT modules above LwDetr modules
d0cfb7ab
sbucaille tests: removed unnecessary overwrite and “test_” attributes
c03d5ee7
sbucaille docs: added missing docs
3342ea88
sbucaille Merge remote-tracking branch 'upstream/main' into add_lw_detr
b01b7c54
sbucaille style: remove unnecessary parentheses
8e2753e0
sbucaille docs: added back logits docstring
06ac9fb9
sbucaille docs: added docs dates
b150f230
sbucaille
Cyrilvallez Merge branch 'main' into add_lw_detr
6f893885
Cyrilvallez style details
8a7818f4
Cyrilvallez unessecary utf8
e5c20a0a
Cyrilvallez might as well skip all config checks
c745f904
Cyrilvallez embeddings are large, increase model_split_percents
098fb4df
Cyrilvallez fix device issue
93ba55ac
Cyrilvallez
github-actions
github-actions
Cyrilvallez update logits
aabdb76d
Cyrilvallez set device in expectations
0493e06a
github-actions
Cyrilvallez
Cyrilvallez approved these changes on 2026-01-12
Cyrilvallez add to toctree
1312458d
HuggingFaceDocBuilderDev
Cyrilvallez Cyrilvallez merged d8541c36 into main 157 days ago
github-actions
sbucaille sbucaille deleted the add_lw_detr branch 157 days ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone