Comments (1)
Thanks for raising this issue. The difference in accuracy you get there is more likely due to the randomness in training than any other reason.
Due to finite arithmetic, results with and without FlashAttention will differ slightly. This is because the underlying algorithm and implementation differ for FlashAttention and standard attention. The backward pass of FlashAttention is implemented in the original flash-attn codebase and has been appropriately tested; PyTorch's autograd engine handles the rest. So it's unlikely there's a bug with the backward pass.
I did another ablation with and without FlashAttention. From the figure below, you can see that the difference is small and not statistically significant. Each curve is based on three independent runs (note I fixed the validation set to be the same for all runs). The full experimental log can be found here.
![Screenshot 2023-06-11 at 1 24 49 PM](https://private-user-images.githubusercontent.com/12689993/244967767-9212f350-fbe8-46b9-9c25-9689f8e8bc5d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzNzUyMzMsIm5iZiI6MTcxOTM3NDkzMywicGF0aCI6Ii8xMjY4OTk5My8yNDQ5Njc3NjctOTIxMmYzNTAtZmJlOC00NmI5LTljMjUtOTY4OWY4ZThiYzVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDA0MDg1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM0NDAyYjFlMmFiZGQ2NTk0YTc4ODMwMDc5NmU5ZWU5ZDY2Njk0NTk5OTY2NGI3YjQzN2E0OTc5ZGE5ODU3OGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.N52VS7Te3Q6ZeSakp6zrPjvOeiNglupZuIGqv0b2iKg)
![Screenshot 2023-06-11 at 1 24 45 PM](https://private-user-images.githubusercontent.com/12689993/244967777-18b65a6c-373b-45c5-b40b-f96814be8bdd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzNzUyMzMsIm5iZiI6MTcxOTM3NDkzMywicGF0aCI6Ii8xMjY4OTk5My8yNDQ5Njc3NzctMThiNjVhNmMtMzczYi00NWM1LWI0MGItZjk2ODE0YmU4YmRkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDA0MDg1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwMzNmMzI0YzkxYTc0NWQzYjc0YTZhYTBmNzA2Mzg3ODdjZTRkZDMzZTkxNzY5MDQ1MzJiZTMzNmUyN2U1YzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._-svcCNf4Z2Dr1nz6y1V9W_pcKrCsfyC4pc10Kk2In8)
from alpaca_farm.
Related Issues (20)
- [Bug] Error importing is_deepspeed_zero3_enabled HOT 1
- Question about KL term HOT 1
- Reproducibility of pretuned reward model
- Use with Llama-2-70b-hf? HOT 4
- KeyError: 'llama' in /recover_model_weights.py HOT 2
- Confusing detail preference mapping HOT 1
- recover_model_weights.py gives WARNING:root:Your base LLaMA checkpoint is converted with transformers==4.27.0.dev0
- Huge memory demand of recover_model_weights.py?
- RewardModel.from_pretrained() loads redundant weights (incurs extra ~30GB of RAM)
- Why use FSDP instead of Deepspeed? HOT 2
- lower cuda version? HOT 1
- integrity_check error with sft10k
- score with reward model HOT 2
- RecursionError: maximum recursion depth exceeded
- BaseAnnotator.__init__() got an unexpected keyword argument 'other_keys_to_keep' HOT 4
- PairwiseAutoAnnotator always "Annotating 0 examples with gpt4_3" HOT 1
- Repeated Deprecation Error HOT 3
- Error downloading pre-trained weights
- Using pretrained models HOT 3
- Inquiry Regarding Supervised Fine-Tuning with AlpacaFarm Framework for Pythia Models HOT 1
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 alpaca_farm.