Comments (4)
Hey @moncefbenaicha, you're temporary solution is actually the right one since the processor only outputs torch.float32
arrays!
However, I do believe it should work with Flash Attention, have you got an error using bloat16 and FA?
from transformers.
from transformers.
Update
A temporary solution is to force the input to bfloat16 and disable flash_attention.
batch = self.processor(
audio=audio_arrays,
sampling_rate=16000,
padding="max_length",
return_tensors="pt",
)
batch["input_features"] = batch["input_features"].to(dtype=torch.bfloat16)
from transformers.
Hey @moncefbenaicha - it would be great to see:
- How you're instantiating the model using
.from_pretrained
. Specifically, what argument you're passing toattn_implementation
,torch_dtype
, and whether you're moving the model manually to a torch device - The training args you're using. Specifically, what you set for
fp16
,bf16
,fp16_full_eval
andbf16_full_eval
Passing bf16_full_eval=True
might be of interest to you if you're casting the model weights to bf16
manually yourself.
from transformers.
Related Issues (20)
- from transformers import Phi3VModel, Phi3VConfig. Phi3 Vision config not added to transformers. HOT 1
- Add ability to specify input device for ffmpeg_microphone() HOT 1
- Slow tokenizer not loading mixtral 8x22b tokenizer correctly HOT 2
- Multi input of owlv2 cause RuntimeError: Boolean value of Tensor with more than one value is ambiguous HOT 2
- Log multiple losses used along with the combined losses when a model returns a dictionary of losses.
- get_wsd_schedule gets passed num_training_steps because not handled HOT 1
- rework `test_multi_gpu_data_parallel_forward`
- Convert_mistral_weights_to_hf fails loading consolidated.safetensors HOT 3
- Caching Past Key values of any length for Vision LLM's HOT 2
- LLAMA3's special_token is not the same in a file as it is used HOT 1
- Pre-training reference URL in Idefics2 codebase HOT 4
- Add HelpingAIForCausalLM to it HOT 7
- NotImplementedError: Cannot copy out of meta tensor; no data! HOT 3
- need better token_type_id processing on transformer GPT2Model HOT 3
- OverflowError: out of range integral type conversion attempted HOT 4
- TypeError: Cannot convert [array([322., 1.])] to EagerTensor of dtype int64
- Hey @JohnHerry, I'm not sure I understand what's the issue. Could you provide a code sample of what seems to be limiting you?
- BitsAndBytesConfig missing a validation
- Understanding loss in Training LLM HOT 2
- Request for Static Cache Support for XLA Compiler in Transformers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transformers.