Bump transformers from 4.38.0 to 4.51.0 in /AI-and-Analytics/Features-and-Functionality/IntelTransformers_Quantization
Type: Pull Request
State: Closed
Association: Contributor
Comments: 1
(11 months ago)
(11 months ago)
(11 months ago)
dependencies python
Bumps transformers from 4.38.0 to 4.51.0.
Release notes
Sourced from transformers's releases.
v4.51.0: Llama 4, Phi4-Multimodal, DeepSeek-v3, Qwen3
New Model Additions
Llama 4
Llama 4, developed by Meta, introduces a new auto-regressive Mixture-of-Experts (MoE) architecture.This generation includes two models:
- The highly capable Llama 4 Maverick with 17B active parameters out of ~400B total, with 128 experts.
- The efficient Llama 4 Scout also has 17B active parameters out of ~109B total, using just 16 experts.
Both models leverage early fusion for native multimodality, enabling them to process text and image inputs. Maverick and Scout are both trained on up to 40 trillion tokens on data encompassing 200 languages (with specific fine-tuning support for 12 languages including Arabic, Spanish, German, and Hindi).
For deployment, Llama 4 Scout is designed for accessibility, fitting on a single server-grade GPU via on-the-fly 4-bit or 8-bit quantization, while Maverick is available in BF16 and FP8 formats. These models are released under the custom Llama 4 Community License Agreement, available on the model repositories
Getting started with Llama 4 using transformers is straightforward. Make sure you have transformers v4.51.0 or later installed:
pip install -U transformers[hf_xet]Here's a quick example using the instruction-tuned Maverick model responding about two images, using tensor parallel for maximum speed. You need to run this script on an instance with 8 GPUs, using a command like:
torchrun –nproc-per-instance=8 script.pyfrom transformers import AutoProcessor, Llama4ForConditionalGeneration import torchmodel_id = "meta-llama/Llama-4-Maverick-17B-128E-Instruct"
processor = AutoProcessor.from_pretrained(model_id) model = Llama4ForConditionalGeneration.from_pretrained( model_id, attn_implementation="flex_attention", device_map="auto", torch_dtype=torch.bfloat16, )
url1 = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg" url2 = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/datasets/cat_style_layout.png" messages = [ { "role": "user", "content": [ {"type": "image", "url": url1}, {"type": "image", "url": url2}, {"type": "text", "text": "Can you describe how these two images are similar, and how they differ?"}, ] }, </tr></table>
... (truncated)
Commits
0720e20Release: v4.51.025b7f27Add llama4 (#37307)aa40fdaHf Xet extra (#37305)e945715Fix deepspeed loading (part 2) (#37306)84aa13dFix deepspeed loading (#37281)0ef339fUpdate OpenAI GPT model card (#37255)46d7391Updated T5 model card with standardized format (#37261)579135aUpdated model card for distilbert (#37157)8cd57ebmobilebert model card update (#37256)ebe47ceFix: Unexpected Keys, Improverun_compressed, Rename Test Folder (#37077)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the Security Alerts page.
Pull Request Statistics
1
2
+2
-2
Package Dependencies
transformers
pip
4.38.0 → 4.51.0
Minor
/AI-and-Analytics/Features-and-Functionality/IntelTransformers_Quantization
Technical Details
| ID: | 2987576 |
| UUID: | 2648657541 |
| Node ID: | PR_kwDOD-2Cwc6d306F |
| Host: | GitHub |
| Repository: | oneapi-src/oneAPI-samples |
| Mergeable: | Yes |
| Merge State: | Clean |