1. 31 May, 2023 3 commits
    • Sylvain Gugger's avatar
    • Sylvain Gugger's avatar
      Re-enable squad test (#23912) · 3ff443a6
      Sylvain Gugger authored
      * Re-enable squad test
      
      * [all-test]
      
      * [all-test] Fix all test command
      
      * Fix the all-test
      3ff443a6
    • Denisa Roberts's avatar
      Add TensorFlow implementation of EfficientFormer (#22620) · 88f50a1e
      Denisa Roberts authored
      * Add tf code for efficientformer
      
      * Fix return dict bug - return last hidden state after last stage
      
      * Fix corresponding return dict bug
      
      * Override test tol
      
      * Change default values of training to False
      
      * Set training to default False X3
      
      * Rm axis from ln
      
      * Set init in dense projection
      
      * Rm debug stuff
      
      * Make style; all tests pass.
      
      * Modify year to 2023
      
      * Fix attention biases codes
      
      * Update the shape list logic
      
      * Add a batch norm eps config
      
      * Remove extract comments in test files
      
      * Add conditional attn and hidden states return for serving output
      
      * Change channel dim checking logic
      
      * Add exception for withteacher model in training mode
      
      * Revert layer count for now
      
      * Add layer count for conditional layer naming
      
      * Transpose for conv happens only in main layer
      
      * Make tests smaller
      
      * Make style
      
      * Update doc
      
      * Rm from_pt
      
      * Change to actual expect image class label
      
      * Remove stray print in tests
      
      * Update image processor test
      
      * Remove the old serving output logic
      
      * Make style
      
      * Make style
      
      * Complete test
      88f50a1e
  2. 30 May, 2023 1 commit
  3. 25 May, 2023 1 commit
  4. 24 May, 2023 1 commit
  5. 18 May, 2023 1 commit
  6. 16 May, 2023 2 commits
  7. 15 May, 2023 1 commit
  8. 12 May, 2023 1 commit
  9. 11 May, 2023 1 commit
  10. 10 May, 2023 1 commit
  11. 09 May, 2023 2 commits
    • Sylvain Gugger's avatar
      Revert "[Doctests] Refactor doctests + add CI" (#23245) · 69ee4624
      Sylvain Gugger authored
      Revert "[Doctests] Refactor doctests + add CI (#22987)"
      
      This reverts commit 627f4479.
      69ee4624
    • Arthur's avatar
      [Doctests] Refactor doctests + add CI (#22987) · 627f4479
      Arthur authored
      
      
      * intiial commit
      
      * new styling
      
      * update
      
      * just run doctest in CI
      
      * remove more test for fast dev
      
      * update
      
      * update refs
      
      * update path and fetch upstream
      
      * update documentatyion trests
      
      * typo
      
      * parse pwd
      
      * don't check for files that are in hidden folders
      
      * just give paths relative to transformers
      
      * update
      
      * update
      
      * update
      
      * major refactoring
      
      * make sure options is ok
      
      * lest test that mdx is tested
      
      * doctest glob
      
      * nits
      
      * update doctest nightly
      
      * some cleaning
      
      * run correct test on diff
      
      * debug
      
      * run on a single worker
      
      * skip_cuda_test tampkate
      
      * updates
      
      * add rA and continue on failure
      
      * test options
      
      * parse `py` codeblock?
      
      * we don't need to replace ignore results, don't remember whyu I put it
      
      * cleanup
      
      * more cleaning
      
      * fix arg
      
      * more cleaning
      
      * clean an todo
      
      * more pre-processing
      
      * doctest-module has none so extra `- ` is needed
      
      * remove logs
      
      * nits
      
      * doctest-modules ....
      
      * oups
      
      * let's use sugar
      
      * make dataset go quiet
      
      * add proper timeout
      
      * nites
      
      * spleling timeout
      
      * update
      
      * properly skip tests that have CUDSA
      
      * proper skipping
      
      * cleaning main and get tests to run
      
      * remove make report?
      
      * remove tee
      
      * some updates
      
      * tee was removed but is the full output still available?
      
      * [all-test]
      
      * only our tests
      
      * don't  touch tee in this PR
      
      * no atee-sys
      
      * proper sub
      
      * monkey
      
      * only replace call
      
      * fix sub
      
      * nits
      
      * nits
      
      * fix invalid syntax
      
      * add skip cuda doctest env variable
      
      * make sure all packages are installed
      
      * move file
      
      * update check repo
      
      * revert changes
      
      * nit
      
      * finish cleanup
      
      * fix re
      
      * findall
      
      * update don't test init files
      
      * ignore pycache
      
      * `-ignore-pycache` when running pytests
      
      * try to fix the import missmatch error
      
      * install dec
      
      * pytest is required as doctest_utils imports things from it
      
      * the only log issues were dataset, ignore results should work
      
      * more cleaning
      
      * Update .circleci/create_circleci_config.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * [ydshieh] empty string if cuda is found
      
      * [ydshieh] fix condition
      
      * style
      
      * [ydshieh] fix
      
      * Add comment
      
      * style
      
      * style
      
      * show failure
      
      * trigger CI
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarYih-Dar <2521628+ydshieh@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      627f4479
  12. 03 May, 2023 1 commit
  13. 25 Apr, 2023 2 commits
  14. 21 Apr, 2023 3 commits
  15. 20 Apr, 2023 1 commit
  16. 19 Apr, 2023 2 commits
    • Arthur's avatar
      Add Segment Anything Model (SAM) (#22654) · 474bf508
      Arthur authored
      
      
      * initial commit
      
      * keys match
      
      * update, fix conversion
      
      * fixes, inference working
      
      * fix
      
      * more fixes
      
      * more fixes
      
      * clean up
      
      * more clean up
      
      * fix copies and add convext copied layer norm
      
      * stash
      
      * pretty big upfate
      
      * cleaning
      
      * more cleaning
      
      * fixup stuffs
      
      * fix copies
      
      * fix iinit
      
      * update test removing tokenizer
      
      * nits
      
      * add pretrained
      
      * more nits
      
      * remove tracking of pipeline
      
      * few fixes
      
      * update san and conversion script
      
      * fix mask decoder and prompt encoder conversion
      
      * fixes
      
      * small update
      
      * fix order
      
      * fix
      
      * fix image embeddings
      
      * nites
      
      * few fixes
      
      * fix logits
      
      * clean up
      
      * fixes boxes inference
      
      * v1 AMG
      
      * clean up
      
      * some clean up
      
      * multi points support
      
      * amg working
      
      * fixup
      
      * clean up
      
      * readme
      
      * update toctree
      
      * fix type hint
      
      * multiple fixes
      
      * fixup
      
      * fixes
      
      * updates
      
      * updates
      
      * more tests
      
      * few fixes
      
      * change to `SamForMaskGeneration`
      
      * doc
      
      * fixup
      
      * fix more tests
      
      * multiple fixes
      
      * fix CI tests
      
      * refactor processor
      
      * renamings
      
      * draft the pipeline
      
      * refactor
      
      * fix tests
      
      * fix test
      
      * few cleanings
      
      * fix test
      
      * edit pipelien support chunking
      
      * udate
      
      * add slow tests
      
      * fix nit
      
      * fixup
      
      * fix nit
      
      * current chunk pipleine
      
      * cast boxes in fp32
      
      * nit
      
      * current updates
      
      * piepleine works
      
      * fixup
      
      * clean up config
      
      * fix slow tests
      
      * fix slow tests
      
      * clean up
      
      * update doc and pipeline
      
      * adds more slow tests
      
      * fix slow tests
      
      * cleaning
      
      * tests pass
      
      * add docstring
      
      * fix copies
      
      * clean up
      
      * support batch of images
      
      * style
      
      * dummy is needed, add tests
      
      * fix slow tests
      
      * fix CI
      
      * update
      
      * adds more tests
      
      * fixes
      
      * fixes
      
      * fixup
      
      * fixes
      
      * few fixes
      
      * filter
      
      * few fixes
      
      * some refactor
      
      * touches finales
      
      * fix
      
      * style
      
      * remove pipeline files
      
      * fixes nits
      
      * revert pipeline changes
      
      * fix test
      
      * fixup
      
      * remove automodel for automatic mask generation
      
      * fix failing torch tests
      
      * update mdx
      
      * revert removal of `MODEL_FOR_AUTOMATIC_MASK_GENERATION_MAPPING`
      
      * update sam config based on review
      Co-authored-by: default avataramyeroberts <aeroberts4444@gmail.com>
      Co-authored-by: default avatarsgugger <sylvain.gugger@gmail.com>
      
      * update low_resolution_masks -> pred_masks
      inti ln with layer_norm_eps
      add_decomposed_rel_pos doc
      forward doc of SamForMaskGeneration
      
      * update processor docstring
      
      * remove image processor import empty
      
      * update for testing
      
      * output vision hidden states + clean recomm
      also test all iou values
      
      * fixup
      
      * fixup
      
      * remove unused
      
      * Update src/transformers/models/sam/modeling_sam.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/sam/image_processing_sam.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * nits
      
      * fix
      
      * fix CI tests and slow tests
      
      * replace with Amy's processor
      
      * clearer docstring
      
      * add `SamVisionNeck`
      
      * refactor - all CI tests should pass
      
      * fix broken import on Gcolab
      
      * few fixes here and there
      
      * fix another bug
      
      * fix more bugs
      
      * update and merge
      
      * correct ckpt
      
      * address comments
      
      * add tips
      
      * revert
      
      * fix docstring
      
      * replace with `SamModel`
      
      * make fixup
      
      * add support for bathed images and batch ed points
      
      * make fixup this time, really
      
      * make fixup again and again
      
      * few fixes here and there, this should be the touche finale
      
      * Update docs/source/en/model_doc/sam.mdx
      
      * fixup
      
      * correct checkpoints
      
      * correct name
      
      * rm unneeded file
      
      * add notebook
      
      ---------
      Co-authored-by: default avataryounesbelkada <younesbelkada@gmail.com>
      Co-authored-by: default avataramyeroberts <aeroberts4444@gmail.com>
      Co-authored-by: default avatarsgugger <sylvain.gugger@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarYounes Belkada <49240599+younesbelkada@users.noreply.github.com>
      474bf508
    • Yih-Dar's avatar
      648bd5a8
  17. 17 Apr, 2023 1 commit
  18. 13 Apr, 2023 3 commits
  19. 11 Apr, 2023 1 commit
  20. 06 Apr, 2023 3 commits
  21. 04 Apr, 2023 1 commit
  22. 31 Mar, 2023 1 commit
    • Sylvain Gugger's avatar
      Test fetch v2 (#22367) · c6126280
      Sylvain Gugger authored
      
      
      * Test fetcher v2
      
      * Fix regexes
      
      * Remove sanity check
      
      * Fake modification to OPT
      
      * Fixes some .sep issues
      
      * Remove fake OPT change
      
      * Fake modif for BERT
      
      * Fake modif for init
      
      * Exclude SageMaker tests
      
      * Fix test and remove fake modif
      
      * Fake setup modif
      
      * Fake pipeline modif
      
      * Remove all fake modifs
      
      * Adds options to skip/force tests
      
      * [test-all-models] Fake modif for BERT
      
      * Try this way
      
      * Does the command actually work?
      
      * [test-all-models] Try again!
      
      * [skip circleci] Remove fake modif
      
      * Remove debug statements
      
      * Add the list of important models
      
      * Quality
      
      * Update utils/tests_fetcher.py
      Co-authored-by: default avatarLysandre Debut <lysandre.debut@reseau.eseo.fr>
      
      * Address review comments
      
      * Address review comments
      
      * Fix and add test
      
      * Apply suggestions from code review
      Co-authored-by: default avatarYih-Dar <2521628+ydshieh@users.noreply.github.com>
      
      * Address review comments
      
      ---------
      Co-authored-by: default avatarLysandre Debut <lysandre.debut@reseau.eseo.fr>
      Co-authored-by: default avatarYih-Dar <2521628+ydshieh@users.noreply.github.com>
      c6126280
  23. 30 Mar, 2023 1 commit
  24. 29 Mar, 2023 1 commit
  25. 28 Mar, 2023 1 commit
  26. 27 Mar, 2023 1 commit
    • Arthur's avatar
      [WIP]`NLLB-MoE` Adds the moe model (#22024) · 19ade242
      Arthur authored
      * Initial commit
      
      * update modeling code
      
      * update doc
      
      * add functions necessary
      
      * fix impotrs
      
      * revert changes
      
      * fixup
      
      * more styling to get going
      
      * remove standalone encoder
      
      * update code
      
      * styling
      
      * fix config and model
      
      * update code and some refactoring
      
      * make more tests pass
      
      * Adding NLLB-200 - MoE - 54.5B for no language left behind
      Fixes #21300
      
      * fix mor common tests
      
      * styke
      
      * update testing file
      
      * update
      
      * update
      
      * Router2 doc
      
      * update check config with sparse layer
      
      * add dummy router
      
      * update current conversion script
      
      * create on the fly conversion script
      
      * Fixup
      
      * style
      
      * style 2
      
      * fix empty return
      
      * fix return
      
      * Update default config sparse layers
      
      * easier to create sparse layers
      
      * update
      
      * update conversion script
      
      * update modeling
      
      * add to toctree
      
      * styling
      
      * make ruff happy
      
      * update docstring
      
      * update conversion script
      
      * update, will break tests but impelemting top2
      
      * update
      
      * local groups are supported here
      
      * ️ Support for local groups is now removed ️
      
      This is because it has to work with model parallelism that we do not support
      
      * finish simplificaiton
      
      * Fix forward
      
      * style
      
      * fixup
      
      * Update modelling and test, refactoring
      
      * update tests
      
      * remove final layer)norm as it is done in the FF
      
      * routing works! Logits test added
      
      * nit in test
      
      * remove top1router
      
      * style
      
      * make sure sparse are tested. Had to change route_tokens a liottle bit
      
      * add support for unslip models when converting
      
      * fixup
      
      * style
      
      * update test s
      
      * update test
      
      * REFACTOR
      
      * encoder outputs match!
      
      * style
      
      * update testing
      
      * 🎉encoder and decoder logits match 🎉
      
      
      
      * styleing
      
      * update tests
      
      * cleanup tests
      
      * fix router test and CIs
      
      * cleanup
      
      * cleanup test styling
      
      * fix tests
      
      * Finally the generation tests match!
      
      * cleanup
      
      * update test
      
      * style testing file
      
      * remove script
      
      * cleanup
      
      * more cleanup
      
      * nits
      
      * update
      
      * NLLB tokenizer is wrong and will be fixed soon
      
      * use LongTensors
      
      * update tests
      
      * revert some small changes
      
      * fix second expert sampling and batch prioritized routing
      
      * update tests
      
      * finish last tests
      
      * make ruff happy
      
      * update
      
      * ruff again
      
      * style
      
      * Update docs/source/en/model_doc/nllb-moe.mdx
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Updates based on review
      
      * style and fix import issue
      
      * nit
      
      * more nits
      
      * cleanup
      
      * styling
      
      * update test_seconde_expert_policy
      
      * fix name
      
      * last nit on the markdown examples
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      19ade242
  27. 23 Mar, 2023 1 commit
  28. 22 Mar, 2023 1 commit