Commit Graph

13832 Commits

Author SHA1 Message Date
SeongWooChoi
173fa7da9c
🌐 [i18n-KO] Translated peft.md to Korean (#25706)
* docs: ko: peft.mdx

* feat: chatgpt draft

* fix: manual edits

* fix: resolve suggestions

Co-authored-by: Wonhyeong Seo <wonhseo@kakao.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: heuristicwave <31366038+heuristicwave@users.noreply.github.com>

* fix: resolve suggestions

Co-authored-by: Sohyun Sim <96299403+sim-so@users.noreply.github.com>

---------

Co-authored-by: Wonhyeong Seo <wonhseo@kakao.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: heuristicwave <31366038+heuristicwave@users.noreply.github.com>
Co-authored-by: Sohyun Sim <96299403+sim-so@users.noreply.github.com>
2023-08-29 09:10:00 -04:00
Dongkeun Yoon
2ee60b757e
fix warning trigger for embed_positions when loading xglm (#25798)
* fix warning triggering for xglm.embed_positions

* Make TF variable a tf.constant to match (and fix some spelling)

---------

Co-authored-by: Matt <rocketknight1@gmail.com>
2023-08-29 14:09:07 +01:00
Arthur
5b5ee235f3
[LlamaTokenizer] tokenize nits. (#25793)
* return when length is zero

* Add tests

Co-authored-by:  Avnish Narayan <38871737avnishn@users.noreply.github.com>

* Co-authored-by: avnishn
<38871737+avnishn@users.noreply.github.com>

* codeLlama doc should not be on Main

* update test

---------

Co-authored-by: Avnish Narayan <38871737avnishn@users.noreply.github.com>
2023-08-29 15:08:14 +02:00
Omar Sanseviero
9525515cd4
Minor wording changes for Code Llama (#25815)
* Update code_llama.md

* Update code_llama.md
2023-08-29 15:02:57 +02:00
zspo
3dd030d264
fix register (#25779) 2023-08-29 14:11:48 +02:00
Younes Belkada
dc0c102954
[Docs] More clarifications on BT + FA (#25823) 2023-08-29 13:52:25 +02:00
Sourab Mangrulkar
c9bae84eb5
Resolving Attribute error when using the FSDP ram efficient feature (#25820)
fix bug
2023-08-29 17:02:19 +05:30
NielsRogge
77713d11f6
[DINOv2] Add backbone class (#25520)
* First draft

* More improvements

* Fix all tests

* More improvements

* Add backbone test

* Improve docstring

* Address comments

* Rename attribute

* Remove expected output

* Update src/transformers/models/dinov2/modeling_dinov2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Fix style

---------

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2023-08-29 11:05:27 +01:00
NielsRogge
4c21da5e34
Add ViTDet (#25524)
* First draft

* Fix READMEs

* Update return_dict

* Add more tests

* Fix docstrings

* Address comments

* Address more comments

* Address more comments

* Address more comments, fix test

* Fix test
2023-08-29 10:03:52 +01:00
Lorenzo Battistela
99c3d44906
fixing name position_embeddings to object_queries (#24652)
* fixing name position_embeddings to object_queries

* [fix] renaming variable and docstring do object queries

* [fix] comment position_embedding to object queries

* [feat] changes from make-fix-copies to keep consistency

* Revert "[feat] changes from make-fix-copies to keep consistency"

This reverts commit 56e3e9ede1.

* [tests] fix wrong expected score

* [fix] wrong assignment causing wrong tensor shapes

* [fix] fixing position_embeddings to object queries to keep consistency (make fix copies)

* [fix] make fix copies, renaming position_embeddings to object_queries

* [fix] positional_embeddingss to object queries, fixes from make fix copies

* [fix] comments frmo make fix copies

* [fix] adding args validation to keep version support

* [fix] adding args validation to keep version support -conditional detr

* [fix] adding args validation to keep version support - maskformer

* [style] make fixup style fixes

* [feat] adding args checking

* [feat] fixcopies and args checking

* make fixup

* make fixup

---------

Co-authored-by: Lorenzobattistela <lorenzobattistela@gmail.com>
2023-08-29 09:09:45 +01:00
Aman Gupta Karmani
39c37fe45c
Fix incorrect Boolean value in deepspeed example (#25788) 2023-08-29 09:22:37 +02:00
Arup De
738ecd17d8
Arde/fsdp activation checkpointing (#25771)
* add FSDP config option to enable activation-checkpointing

* update docs

* add checks and remove redundant code

* fix formatting error
2023-08-29 12:52:14 +05:30
Stas Bekman
50573c648a
[idefics] fix vision's hidden_act (#25787)
[idefics] fix vision's hidden_act
2023-08-28 07:37:37 -07:00
David Reguera
886b6be081
Add type hints for several pytorch models (batch-4) (#25749)
* Add type hints for MGP STR model

* Add missing type hints for plbart model

* Add type hints for Pix2struct model

* Add missing type hints to Rag model and tweak the docstring

* Add missing type hints to Sam model

* Add missing type hints to Swin2sr model

* Fix a type hint for Pix2StructTextModel

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

* Fix typo on Rag model docstring

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

* Fix linter

---------

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2023-08-28 14:31:33 +01:00
David Reguera
ed915cff97
Add type hints for pytorch models (final batch) (#25750)
* Add type hints for table_transformer

* Add type hints to Timesformer model

* Add type hints to Timm Backbone model

* Add type hints to TVLT family models

* Add type hints to Vivit family models

* Use the typing instance instead of the python builtin.

* Fix the `replace_return_docstrings` decorator for Vivit model

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

---------

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2023-08-28 14:31:22 +01:00
David Reguera
cb91ec67b5
Add type hints for several pytorch models (batch-2) (#25557)
* Add missing type hint to cpmant

* Add type hints to decision_transformer model

* Add type hints to deformable_detr models

* Add type hints to detr models

* Add type hints to deta models

* Add type hints to dpr models

* Update attention mask type hint

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>

* Update remaining attention masks type hints

* Update docstrings' type hints related to attention masks

---------

Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
2023-08-28 13:58:23 +01:00
Arthur
de139702a1
[LlamaFamiliy] add a tip about dtype (#25794)
* add a warning=True tip to the Llama2 doc

* code llama needs a tip too

* doc nit

* build PR doc

* doc nits

Co-authored-by: Lysandre <lysandre@huggingface.co>

---------

Co-authored-by: Lysandre <lysandre@huggingface.co>
2023-08-28 12:07:31 +02:00
Tigran Khachatryan
686c68f64c
Add docstrings and fix VIVIT examples (#25628)
* fix docstrings and examples

* docstring update

* add missing whitespace
2023-08-26 20:08:47 +01:00
Stas Bekman
960807f62e
[idefics] small fixes (#25764) 2023-08-25 10:59:29 -07:00
Arthur
015f8e110d
[CodeLlama] Add support for CodeLlama (#25740)
* add all

* Revert "Delete .github directory"

This reverts commit 9b0ff7b052e2b20b629a26fb13606b78a42944d1.

* make conversion script backward compatible

* fixup

* more styling

* copy to llama changes

* fix repo consistency

* nits

* document correct classes

* updates

* more fixes

* nits

* update auto mappings

* add readmes

* smallupdates

* llama-code replace with llama_code

* make fixup

* updates to the testsing suite

* fix fast nits

* more small fixes

* fix decode

* fix template processing

* properly reset the normalizer

* nits processor

* tokenization tests pass

* styling

* last tests

* additional nits

* one test is left

* nits

Co-authored-by faabian <faabian@users.noreply.github.com>

* update failing test

* fixup

* remove decode infilling users should handle it on their onw after generation, padding can be a problem

* update

* make test slow and more meaningfull

* fixup

* doc update

* fixup

* Apply suggestions from code review

* add kwargs doc

* tokenizer requires `requires_backend`

* type requires_backends

* CodeLlama instead of LlamaCode

* more name cahnges

* nits

* make doctests happy

* small pipeline nits

* last nit

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* update

* add codellama to toctree

---------

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-08-25 18:57:40 +02:00
Alan Ji
74081cb5fa
fix a typo in docsting (#25759)
* fix a typo in docsting

* Update src/transformers/modeling_utils.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

---------

Co-authored-by: statelesshz <jihuazhong1@huawei.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2023-08-25 17:46:56 +02:00
Tianlin Liu
0040469bb8
Correct attention mask dtype for Flax GPT2 (#25636)
* Correct attention mask dtype

* reformat code

* add a test for boolean mask

* convert test to fast test

* delete unwanted print

* use assertTrue for testing
2023-08-25 17:36:37 +02:00
Younes Belkada
4b79697865
🚨🚨🚨 [Refactor] Move third-party related utility files into integrations/ folder 🚨🚨🚨 (#25599)
* move deepspeed to `lib_integrations.deepspeed`

* more refactor

* oops

* fix slow tests

* Fix docs

* fix docs

* addess feedback

* address feedback

* final modifs for PEFT

* fixup

* ok now

* trigger CI

* trigger CI again

* Update docs/source/en/main_classes/deepspeed.md

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* import from `integrations`

* address feedback

* revert removal of `deepspeed` module

* revert removal of `deepspeed` module

* fix conflicts

* ooops

* oops

* add deprecation warning

* place it on the top

* put `FutureWarning`

* fix conflicts with not_doctested.txt

* add back `bitsandbytes` module with a depr warning

* fix

* fix

* fixup

* oops

* fix doctests

---------

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-08-25 17:13:34 +02:00
David Reguera
4d9e45f3ef
Add type hints for several pytorch models (batch-3) (#25705)
* Add missing type hints for ErnieM family

* Add missing type hints for EsmForProteinFolding model

* Add missing type hints for Graphormer model

* Add type hints for InstructBlipQFormer model

* Add missing type hints for LayoutLMForMaskedLM model

* Add missing type hints for LukeForEntitySpanClassification model
2023-08-25 15:12:54 +01:00
Joao Gante
8b0a7bfcdc
Docs: fix indentation in HammingDiversityLogitsProcessor (#25756) 2023-08-25 14:56:39 +01:00
Marc Sun
35c570c80e
fix encoder hook (#25735)
* fix encoder hook

* style
2023-08-25 09:36:41 -04:00
Arthur
dd8b7d28ae
[Sentencepiece] make sure legacy do not require protobuf (#25684)
make sure legacy does not require `protobuf`
2023-08-25 14:41:04 +02:00
Sanchit Gandhi
0770ce6cfb
[CLAP] Fix logit scales dtype for fp16 (#25754) 2023-08-25 13:30:39 +01:00
Joao Gante
494e96d8d6
Generate: logits processors are doctested and fix broken doctests (#25692)
* shorter example

* add logits processors to doctests

* remove file from conflict?

* tmp commit

* Fix broken tests; Shorter sampling tests

* Apply suggestions from code review

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

---------

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2023-08-25 12:42:06 +01:00
Jess
c6a84b7202
[DOCS] Add example for HammingDiversityLogitsProcessor (#25481)
* updated logits processor text

* Update logits_process.py

* fixed formatting with black

* fixed formatting with black

* fixed formatting with Make Fixup

* more formatting fixes

* Update src/transformers/generation/logits_process.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Update src/transformers/generation/logits_process.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Revert "fixed formatting with Make Fixup"

This reverts commit 47643083

* Revert "fixed formatting with black"

This reverts commit bfb1536736.

* Revert "fixed formatting with Make Fixup"

This reverts commit 47643083

* Revert "fixed formatting with Make Fixup"

This reverts commit 47643083

* Revert "fixed formatting with black"

This reverts commit ad6ceb64

* Revert "fixed formatting with black"

This reverts commit ad6ceb64b7.

* Update src/transformers/generation/logits_process.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Revert "fixed formatting with Make Fixup"

This reverts commit 47643083

* formatted logits_process with make fixup

---------

Co-authored-by: jesspeck <jess@localseoguide.com>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2023-08-25 12:35:40 +01:00
Joao Gante
85cf90a1c9
Generate: add missing logits processors docs (#25653) 2023-08-25 11:56:17 +01:00
Pedro Cuenca
cb8e3ee25f
Add FlaxCLIPTextModelWithProjection (#25254)
* Add FlaxClipTextModelWithProjection

This is necessary to support the Flax port of Stable Diffusion XL: fb6d705fb5/text_encoder_2/config.json (L3)

Co-authored-by: Martin Müller <martin.muller.me@gmail.com>
Co-authored-by: Juan Acevedo <juancevedo@gmail.com>

* Use FlaxCLIPTextModelOutput

* make fix-copies again

* Apply suggestions from code review

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* Use `return_dict` for consistency with other uses.

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* Fix docstring example.

* Add new model to FlaxCLIPTextModelTest

* Add to IGNORE_NON_AUTO_CONFIGURED list

* Fix naming convention.

---------

Co-authored-by: Martin Müller <martin.muller.me@gmail.com>
Co-authored-by: Juan Acevedo <juancevedo@gmail.com>
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
2023-08-25 10:58:14 +02:00
Anthony Susevski
8968fface4
fixed typo in speech encoder decoder doc (#25745)
fixed typo in speech encoder decoder blog
2023-08-25 09:20:37 +02:00
Younes Belkada
ae320fa53f
[PEFT] Fix PeftConfig save pretrained when calling add_adapter (#25738)
fix save_pretrained issue + add test
2023-08-25 08:19:11 +02:00
Wonhyeong Seo
f26099e7b5
🌐 [i18n-KO] Translated visual_question_answering.md to Korean (#25679)
* docs: ko: visual_question_answering.md

* feat: chatgpt draft

tosquash: add code blocks

* fix: manual edits

~L34 14:25
~L126 16:52
~L224 17:00
~L335 17:11
~EOF 17:18

* fix: self-correction

* amend grammar, phrasing

* docs: add new entry to _toctree.yml

* fix: use terms from glossary

Co-authored-by: SeongWooChoi <46990061+nuatmochoi@users.noreply.github.com>

---------

Co-authored-by: SeongWooChoi <46990061+nuatmochoi@users.noreply.github.com>
2023-08-24 11:14:58 -07:00
Sanchit Gandhi
0218876822
[ASR Pipe Test] Fix CTC timestamps error message (#25727) 2023-08-24 17:58:37 +01:00
Younes Belkada
fd0b94fd7b
[from_pretrained] Fix failing PEFT tests (#25733)
fix failing PEFT tests
2023-08-24 18:48:41 +02:00
amyeroberts
1b2381c46b
ImageProcessor - check if input pixel values between 0-255 (#25688)
* Check if pixel values between 0-255 and add doc clarification

* Add missing docstrings

* _is_scale_image -> is_scaled_image

* Spelling is hard

* Tidy up
2023-08-24 17:24:36 +01:00
Stas Bekman
7a6efe1e9f
[idefics] idefics-9b test use 4bit quant (#25734) 2023-08-24 08:33:14 -07:00
Arthur
fecf08560c
[from_pretrained] Simpler code for peft (#25726)
* refactor complicated from pretrained for peft

* nits

* more nits

* Update src/transformers/modeling_utils.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* make tests happy

* fixup after merge

---------

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-08-24 16:18:39 +02:00
Joao Gante
0a365c3e6a
Generate: nudge towards do_sample=False when temperature=0.0 (#25722) 2023-08-24 14:15:43 +01:00
Younes Belkada
584eeb5387
[AutoGPTQ] Add correct installation of GPTQ library + fix slow tests (#25713)
* add correct installation of GPTQ library

* update tests values
2023-08-24 14:57:16 +02:00
Sylvain Gugger
2febd50614
Fix number of minimal calls to the Hub with peft integration (#25715)
* Fix number of minimal calls to the Hub with peft integration

* Alternate design

* And this way?

* Revert

* Address comments
2023-08-24 14:56:11 +02:00
Younes Belkada
70b49f023c
[PEFT] Fix peft version (#25710)
* fix peft version

* address comments

* adapt suggestion
2023-08-24 12:09:12 +02:00
Yih-Dar
8fff61b9db
Fix failing test_batch_generation for bloom (#25718)
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-08-24 11:15:29 +02:00
Tom Aarsen
f01459c75d
docs: Resolve typos in warning text (#25711)
Resolve typos in warning text
2023-08-24 11:14:27 +02:00
Sylvain Gugger
c2123626aa
Update list of persons to tag (#25708) 2023-08-24 10:13:30 +02:00
Arthur
6e6da5e4b8
[LlamaTokenizer] make unk_token_length a property (#25689)
make unk_token_length a property
2023-08-24 08:03:34 +02:00
Sourab Mangrulkar
b85b88069a
fix ram efficient fsdp init (#25686) 2023-08-24 11:30:42 +05:30
Sylvain Gugger
68fa9a5937
Skip broken tests 2023-08-24 01:48:53 -04:00