From e02aef1dedc15e9eed9410b54c5024832e9f3164 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 16 Apr 2024 11:48:54 -0700
Subject: [PATCH] Bump transformers from 4.36.0 to 4.38.0 in
/onnxruntime/python/tools/transformers/models/stable_diffusion (#20271)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps [transformers](https://github.com/huggingface/transformers) from
4.36.0 to 4.38.0.
Sourced from transformers's
releases. Gemma is a new opensource Language Model series from Google AI that
comes with a 2B and 7B variant. The release comes with the pre-trained
and instruction fine-tuned versions and you can use them via
Read more about it in the Gemma release blogpost: https://hf.co/blog/gemma tokenizer =
AutoTokenizer.from_pretrained("google/gemma-2b")
model =
AutoModelForCausalLM.from_pretrained("google/gemma-2b",
device_map="auto", torch_dtype=torch.float16) input_text = "Write me a poem about Machine Learning."
input_ids = tokenizer(input_text,
return_tensors="pt").to("cuda") outputs = model.generate(**input_ids)
Release notes
v4.38: Gemma, Depth Anything, Stable LM; Static Cache, HF Quantizer,
AQLM
New model additions
💎 Gemma 💎
AutoModelForCausalLM, GemmaForCausalLM or
pipeline interface!from transformers import AutoTokenizer,
AutoModelForCausalLM
You can use the model with Flash Attention, SDPA, Static cache and quantization API for further optimizations !
from transformers import AutoTokenizer,
AutoModelForCausalLM
tokenizer =
AutoTokenizer.from_pretrained("google/gemma-2b")
model = AutoModelForCausalLM.from_pretrained(
"google/gemma-2b", device_map="auto",
torch_dtype=torch.float16,
attn_implementation="flash_attention_2"
)
input_text = "Write me a poem about Machine Learning."
input_ids = tokenizer(input_text,
return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids)
from transformers import AutoTokenizer,
AutoModelForCausalLM
tokenizer =
AutoTokenizer.from_pretrained("google/gemma-2b")
model = AutoModelForCausalLM.from_pretrained(
"google/gemma-2b", device_map="auto",
load_in_4bit=True
)
</tr></table>
... (truncated)
08ab54a
[ gemma] Adds support for Gemma 💎 (#29167)2de9314
[Maskformer] safely get backbone config (#29166)476957b
🚨 Llama: update rope scaling to match static cache changes (#29143)7a4bec6
Release: 4.38.0ee3af60
Add support for fine-tuning CLIP-like models using
contrastive-image-text exa...0996a10
Revert low cpu mem tie weights (#29135)15cfe38
[Core tokenization] add_dummy_prefix_space
option to help with latest is...efdd436
FIX [PEFT / Trainer ] Handle better peft +
quantized compiled models (#29...5e95dca
[cuda kernels] only compile them when initializing (#29133)a7755d2
Generate: unset GenerationConfig parameters do not raise warning (#29119)