-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(deps): update dependency transformers to v4.44.2 #164
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/transformers-4.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #164 +/- ##
=======================================
Coverage 71.68% 71.68%
=======================================
Files 15 15
Lines 226 226
=======================================
Hits 162 162
Misses 64 64 ☔ View full report in Codecov by Sentry. |
400b600
to
8c26689
Compare
8c26689
to
dc2fe5d
Compare
dc2fe5d
to
0dd9007
Compare
0dd9007
to
295a997
Compare
295a997
to
68c5cd4
Compare
68c5cd4
to
9adc4cb
Compare
9adc4cb
to
5399c0f
Compare
5399c0f
to
4026344
Compare
4026344
to
e2aa96f
Compare
e2aa96f
to
ac28889
Compare
ac28889
to
118e96c
Compare
118e96c
to
4b394cd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==4.41.2
->==4.44.2
Release Notes
huggingface/transformers (transformers)
v4.44.2
Compare Source
Patch release v4.44.2, mostly 2 regressions that were not caught for Jamba and for processors!
v4.44.1
: Patch release v4.44.1Compare Source
Here are the different fixes, mostly Gemma2 context length, nits here and there, and generation issues
Full Changelog: huggingface/transformers@v4.44.0...v4.44.1
v4.44.0
Compare Source
Release v4.44.0: End to end compile generation!!! Gemma2 (with assisted decoding), Codestral (Mistral for code), Nemotron, Efficient SFT training, CPU Offloaded KVCache, torch export for static cache
This release comes a bit early in our cycle because we wanted to ship important and requested models along with improved performances for everyone!
All of these are included with examples in the awesome https://github.com/huggingface/local-gemma repository! 🎈 We tried to share examples of what is now possible with all the shipped features! Kudos to @gante, @sanchit-gandhi and @xenova
💥 End-to-end generation compile
Generate: end-to-end compilation #30788 by @gante:
model.generate
now supports compiling! There are a few limitations, but here is a small snippet:⚡ 3 to 5x compile speedup (compilation time 👀 not runtime)
As documented on the PR, this makes the whole generation a lot faster when you re-use the cache!
You can see this when you run
model.forward = torch.compile(model.forward, mode="reduce-overhead", fullgraph=True)
🪶 Offloaded KV cache: offload the cache to CPU when you are GPU poooooor 🚀
cache_implementation="offloaded"
when callingfrom_pretrained
or using this:📦 Torch export for static cache
pytorch
team gave us a great gift: you can now usetorch.export
directly compatible with Executorch! Find examples here.This also unlocks support for prompt reuse:
Gemma2: assisted decoding
Gemma 2: support assisted generation #32357 by @gante
We now have a 2B Gemma 2 model -- a perfect sidekick for the 27B with assisted generation. We've enabled assisted generation in gemma 2, with a caveat: assisted generation currently requires the use of a windowless cache (as opposed to the default cache for gemma 2), so you might observe some output mismatch on long sequences. Read more about it here.
Nemotron support
The conversion script should be able to cover Minitron and Nemotron, thanks and kudos to @suiyoubi. See:
Codestral support
Codestral saves developers time and effort: it can complete coding functions, write tests, and complete any partial code using a fill-in-the-middle mechanism. Interacting with Codestral will help level up the developer’s coding game and reduce the risk of errors and bugs.
It's mamba2 architecture, was a bit of a pain to remove all einops but hope we made it better for everyone!
Breaking changes:
We removed the chat template in the code, they should all be on the hub!
Long-form decoding for whisper, even faster:
Our great @sanchit-gandhi worked on porting the recent compile upgrades to long form decoding in
What's Changed
ruff
to the latest version by @Sai-Suraj-27 in https://github.com/huggingface/transformers/pull/31926unittest method
with the correct one by @Sai-Suraj-27 in https://github.com/huggingface/transformers/pull/32198eos
for assisted decoding by @zucchini-nlp in https://github.com/huggingface/transformers/pull/31301object
base class by @Sai-Suraj-27 in https://github.com/huggingface/transformers/pull/32230target_sizes is None
inpost_process_image_guided_detection
for owlv2 by @catalys1 in https://github.com/huggingface/transformers/pull/31934static
cache implementation is not compatible withattn_implementation==flash_attention_2
by @faaany in https://github.com/huggingface/transformers/pull/32039convert_blip_checkpoint
function call by @Sai-Suraj-27 in https://github.com/huggingface/transformers/pull/32262check_docstrings
by @gante in https://github.com/huggingface/transformers/pull/32259p_mask
a numpy array before passing toselect_starts_ends
by @faaany in https://github.com/huggingface/transformers/pull/32076gguf==0.9.1
by @Isotr0py in https://github.com/huggingface/transformers/pull/32298fetch-depth: 0
in trufflehog checkout step by @McPatate in https://github.com/huggingface/transformers/pull/31663inv_freq
assignment by @gante in https://github.com/huggingface/transformers/pull/32330staticmethods
with self as first argument by @Sai-Suraj-27 in https://github.com/huggingface/transformers/pull/32361speech
dep to the consistency docker image by @gante in https://github.com/huggingface/transformers/pull/32374transformers/examples/flax/language-modeling/t5_tokenizer_model.py
. by @fshp971 in https://github.com/huggingface/transformers/pull/32157test_embeded_special_tokens
for luke and mluke models by @Sai-Suraj-27 in https://github.com/huggingface/transformers/pull/32413preprocess
with decorator by @qubvel in https://github.com/huggingface/transformers/pull/32024New Contributors
Full Changelog: huggingface/transformers@v4.43.4...v4.44.0
v4.43.4
: Patch ReleaseCompare Source
Patch Release v4.43.4
There was a mick mack, now deepseep issues are properly pushed with:
🤗 Enjoy holidays
v4.43.3
: Patch deepspeedCompare Source
Patch release v4.43.3:
We still saw some bugs so @zucchini-nlp added:
Other fixes:
v4.43.2
: : Patch releaseCompare Source
v4.43.1
: : Patch releaseCompare Source
v4.43.0
: : Llama 3.1, Chameleon, ZoeDepth, HieraCompare Source
Llama
The Llama 3.1 models are released by Meta and come in three flavours: 8B, 70B, and 405B.
To get an overview of Llama 3.1, please visit the Hugging Face announcement blog post.
We release a repository of llama recipes to showcase usage for inference, total and partial fine-tuning of the different variants.
Chameleon
The Chameleon model was proposed in Chameleon: Mixed-Modal Early-Fusion Foundation Models by META AI Chameleon Team. Chameleon is a Vision-Language Model that use vector quantization to tokenize images which enables the model to generate multimodal output. The model takes images and texts as input, including an interleaved format, and generates textual response.
ZoeDepth
The ZoeDepth model was proposed in ZoeDepth: Zero-shot Transfer by Combining Relative and Metric Depth by Shariq Farooq Bhat, Reiner Birkl, Diana Wofk, Peter Wonka, Matthias Müller. ZoeDepth extends the DPT framework for metric (also called absolute) depth estimation. ZoeDepth is pre-trained on 12 datasets using relative depth and fine-tuned on two domains (NYU and KITTI) using metric depth. A lightweight head is used with a novel bin adjustment design called metric bins module for each domain. During inference, each input image is automatically routed to the appropriate head using a latent classifier.
Hiera
Hiera was proposed in Hiera: A Hierarchical Vision Transformer without the Bells-and-Whistles by Chaitanya Ryali, Yuan-Ting Hu, Daniel Bolya, Chen Wei, Haoqi Fan, Po-Yao Huang, Vaibhav Aggarwal, Arkabandhu Chowdhury, Omid Poursaeed, Judy Hoffman, Jitendra Malik, Yanghao Li, Christoph Feichtenhofer
The paper introduces “Hiera,” a hierarchical Vision Transformer that simplifies the architecture of modern hierarchical vision transformers by removing unnecessary components without compromising on accuracy or efficiency. Unlike traditional transformers that add complex vision-specific components to improve supervised classification performance, Hiera demonstrates that such additions, often termed “bells-and-whistles,” are not essential for high accuracy. By leveraging a strong visual pretext task (MAE) for pretraining, Hiera retains simplicity and achieves superior accuracy and speed both in inference and training across various image and video recognition tasks. The approach suggests that spatial biases required for vision tasks can be effectively learned through proper pretraining, eliminating the need for added architectural complexity.
Agents
Our ReactAgent has a specific way to return its final output: it calls the tool final_answer, added to the user-defined toolbox upon agent initialization, with the answer as the tool argument. We found that even for a one-shot agent like CodeAgent, using a specific final_answer tools helps the llm_engine find what to return: so we generalized the final_answer tool for all agents.
Now if your code-based agent (like ReactCodeAgent) defines a function at step 1, it will remember the function definition indefinitely. This means your agent can create its own tools for later re-use!
This is a transformative PR: it allows the agent to regularly run a specific step for planning its actions in advance. This gets activated if you set an int for planning_interval upon agent initialization. At step 0, a first plan will be done. At later steps (like steps 3, 6, 9 if you set planning_interval=3 ), this plan will be updated by the agent depending on the history of previous steps. More detail soon!
Notable changes to the codebase
A significant RoPE refactor was done to make it model agnostic and more easily adaptable to any architecture.
It is only applied to Llama for now but will be applied to all models using RoPE over the coming days.
Breaking changes
TextGenerationPipeline and tokenizer kwargs
🚨🚨 This PR changes the code to rely on the tokenizer's defaults when these flags are unset. This means some models using
TextGenerationPipeline
previously did not add a<bos>
by default, which (negatively) impacted their performance. In practice, this is a breaking change.Example of a script changed as a result of this PR:
Bugfixes and improvements
get_seq_length
method by @sanchit-gandhi in #31661keras-nlp<0.14
pin by @gante in #31684tets/test_xxx_utils.py
) totests/utils
by @ydshieh in #31730pytest_num_workers=4
for some CircleCI jobs by @ydshieh in #31764Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.