Skip to content
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

Update dependency transformers to v4.41.1 #117

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 29, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
transformers ==4.36.0 -> ==4.41.1 age adoption passing confidence

Release Notes

huggingface/transformers (transformers)

v4.41.1: Fix PaliGemma finetuning, and some small bugs

Compare Source

Release v4.41.1

Fix PaliGemma finetuning:

The causal mask and label creation was causing label leaks when training. Kudos to @​probicheaux for finding and reporting!

Other fixes:

Reverted huggingface/transformers@4ab7a28

v4.41.0: : Phi3, JetMoE, PaliGemma, VideoLlava, Falcon2, FalconVLM & GGUF support

Compare Source

New models
Phi3

The Phi-3 model was proposed in Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone by Microsoft.

TLDR; Phi-3 introduces new ROPE scaling methods, which seems to scale fairly well! A 3b and a
Phi-3-mini is available in two context-length variants—4K and 128K tokens. It is the first model in its class to support a context window of up to 128K tokens, with little impact on quality.

image
JetMoE

JetMoe-8B is an 8B Mixture-of-Experts (MoE) language model developed by Yikang Shen and MyShell. JetMoe project aims to provide a LLaMA2-level performance and efficient language model with a limited budget. To achieve this goal, JetMoe uses a sparsely activated architecture inspired by the ModuleFormer. Each JetMoe block consists of two MoE layers: Mixture of Attention Heads and Mixture of MLP Experts. Given the input tokens, it activates a subset of its experts to process them. This sparse activation schema enables JetMoe to achieve much better training throughput than similar size dense models. The training throughput of JetMoe-8B is around 100B tokens per day on a cluster of 96 H100 GPUs with a straightforward 3-way pipeline parallelism strategy.

image
PaliGemma

PaliGemma is a lightweight open vision-language model (VLM) inspired by PaLI-3, and based on open components like the SigLIP vision model and the Gemma language model. PaliGemma takes both images and text as inputs and can answer questions about images with detail and context, meaning that PaliGemma can perform deeper analysis of images and provide useful insights, such as captioning for images and short videos, object detection, and reading text embedded within images.

More than 120 checkpoints are released see the collection here !

image
VideoLlava

Video-LLaVA exhibits remarkable interactive capabilities between images and videos, despite the absence of image-video pairs in the dataset.

💡 Simple baseline, learning united visual representation by alignment before projection
With the binding of unified visual representations to the language feature space, we enable an LLM to perform visual reasoning capabilities on both images and videos simultaneously.
🔥 High performance, complementary learning with video and image
Extensive experiments demonstrate the complementarity of modalities, showcasing significant superiority when compared to models specifically designed for either images or videos.

image
Falcon 2 and FalconVLM:
image

Two new models from TII-UAE! They published a blog-post with more details! Falcon2 introduces parallel mlp, and falcon VLM uses the Llava framework

GGUF from_pretrained support
image

You can now load most of the GGUF quants directly with transformers' from_pretrained to convert it to a classic pytorch model. The API is simple:

from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF"
filename = "tinyllama-1.1b-chat-v1.0.Q6_K.gguf"

tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename)

We plan more closer integrations with llama.cpp / GGML ecosystem in the future, see: https://github.com/huggingface/transformers/issues/27712 for more details

Quantization
New quant methods

In this release we support new quantization methods: HQQ & EETQ contributed by the community. Read more about how to quantize any transformers model using HQQ & EETQ in the dedicated documentation section

dequantize API for bitsandbytes models

In case you want to dequantize models that have been loaded with bitsandbytes, this is now possible through the dequantize API (e.g. to merge adapter weights)

API-wise, you can achieve that with the following:

from transformers import AutoModelForCausalLM, BitsAndBytesConfig, AutoTokenizer

model_id = "facebook/opt-125m"

model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=BitsAndBytesConfig(load_in_4bit=True))
tokenizer = AutoTokenizer.from_pretrained(model_id)

model.dequantize()

text = tokenizer("Hello my name is", return_tensors="pt").to(0)

out = model.generate(**text)
print(tokenizer.decode(out[0]))
Generation updates
SDPA support
Improved Object Detection

Addition of fine-tuning script for object detection models

Interpolation of embeddings for vision models

Add interpolation of embeddings. This enables predictions from pretrained models on input images of sizes different than those the model was originally trained on. Simply pass interpolate_pos_embedding=True when calling the model.

Added for: BLIP, BLIP 2, InstructBLIP, SigLIP, ViViT

import requests
from PIL import Image
from transformers import Blip2Processor, Blip2ForConditionalGeneration

image = Image.open(requests.get("https://huggingface.co/hf-internal-testing/blip-test-image/resolve/main/demo.jpg", stream=True).raw)
processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
model = Blip2ForConditionalGeneration.from_pretrained(
    "Salesforce/blip2-opt-2.7b", 
    torch_dtype=torch.float16
).to("cuda")
inputs = processor(images=image, size={"height": 500, "width": 500}, return_tensors="pt").to("cuda")

predictions = model(**inputs, interpolate_pos_encoding=True)

##### Generated text: "a woman and dog on the beach"
generated_text = processor.batch_decode(predictions, skip_special_tokens=True)[0].strip()
🚨 might be breaking
Cleanups
Not breaking but important for Llama tokenizers
Fixes

Configuration

📅 Schedule: Branch creation - "* 0-4 * * 3" (UTC), 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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.36.2

logError The patch is trivial, no need for a summarization

@renovate renovate bot changed the title Update dependency transformers to v4.36.2 Update dependency transformers to v4.37.0 Jan 22, 2024
@renovate renovate bot force-pushed the renovate/transformers-4.x branch from e7b1f9f to 5c72896 Compare January 22, 2024 14:10
Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.37.0

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot changed the title Update dependency transformers to v4.37.0 Update dependency transformers to v4.37.1 Jan 24, 2024
@renovate renovate bot force-pushed the renovate/transformers-4.x branch from 5c72896 to d0835b4 Compare January 24, 2024 19:08
Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.37.1

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from d0835b4 to 88777f2 Compare January 29, 2024 19:11
@renovate renovate bot changed the title Update dependency transformers to v4.37.1 Update dependency transformers to v4.37.2 Jan 29, 2024
Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.37.2

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from 88777f2 to b7a489c Compare February 25, 2024 16:20
@renovate renovate bot changed the title Update dependency transformers to v4.37.2 Update dependency transformers to v4.38.0 Feb 25, 2024
Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.38.0

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from b7a489c to 99c6a1e Compare February 26, 2024 01:39
@renovate renovate bot changed the title Update dependency transformers to v4.38.0 Update dependency transformers to v4.38.1 Feb 26, 2024
Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.38.1

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from 99c6a1e to f6447bb Compare March 5, 2024 04:35
@renovate renovate bot changed the title Update dependency transformers to v4.38.1 Update dependency transformers to v4.38.2 Mar 5, 2024
Copy link

github-actions bot commented Mar 5, 2024

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.38.2

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from f6447bb to bc439ac Compare March 25, 2024 01:44
@renovate renovate bot changed the title Update dependency transformers to v4.38.2 Update dependency transformers to v4.39.0 Mar 25, 2024
Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.39.0

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from bc439ac to 747c8c5 Compare March 26, 2024 18:38
@renovate renovate bot changed the title Update dependency transformers to v4.39.0 Update dependency transformers to v4.39.1 Mar 26, 2024
Copy link

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.39.1

logError The text contains a special token that is not allowed: <|endoftext|>

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from 747c8c5 to b199401 Compare April 1, 2024 19:41
@renovate renovate bot changed the title Update dependency transformers to v4.39.1 Update dependency transformers to v4.39.2 Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.39.2

logError 400 {"type":"error","error":{"type":"invalid_request_error","message":"too many total bytes: 11776613 > 9000000"}}

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from b199401 to 644da71 Compare April 6, 2024 11:40
@renovate renovate bot changed the title Update dependency transformers to v4.39.2 Update dependency transformers to v4.39.3 Apr 6, 2024
Copy link

github-actions bot commented Apr 6, 2024

[puLL-Merge] - huggingface/transformers@v4.36.0..v4.39.3

logError 400 {"type":"error","error":{"type":"invalid_request_error","message":"too many total bytes: 11778214 > 9000000"}}

@renovate renovate bot force-pushed the renovate/transformers-4.x branch from 644da71 to 5b907ce Compare April 22, 2024 14:04
@renovate renovate bot changed the title Update dependency transformers to v4.39.3 Update dependency transformers to v4.40.0 Apr 22, 2024
@renovate renovate bot force-pushed the renovate/transformers-4.x branch from 5b907ce to 1ef1873 Compare April 28, 2024 00:23
@renovate renovate bot changed the title Update dependency transformers to v4.40.0 Update dependency transformers to v4.40.1 Apr 28, 2024
@renovate renovate bot force-pushed the renovate/transformers-4.x branch from 1ef1873 to d8936bf Compare May 10, 2024 16:44
@renovate renovate bot changed the title Update dependency transformers to v4.40.1 Update dependency transformers to v4.40.2 May 10, 2024
@renovate renovate bot force-pushed the renovate/transformers-4.x branch from d8936bf to f652f32 Compare May 21, 2024 19:12
@renovate renovate bot changed the title Update dependency transformers to v4.40.2 Update dependency transformers to v4.41.0 May 21, 2024
@renovate renovate bot force-pushed the renovate/transformers-4.x branch from f652f32 to 18941d9 Compare May 26, 2024 22:30
@renovate renovate bot changed the title Update dependency transformers to v4.41.0 Update dependency transformers to v4.41.1 May 26, 2024
Copy link
Contributor Author

renovate bot commented Jun 3, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (==4.41.1). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/transformers-4.x branch June 3, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant