text
🚀 **InfiniTransformer, Gemma/Llama3 based Implementation!** 🌌
🚀 **InfiniTransformer, Gemma/Llama3 based Implementation!** 🌌
new_line
new_line
text
> Update @ 2024.04.19: It now supports Llama-3!
> Update @ 2024.04.19: It now supports Llama-3!
new_line
new_line
text
> Note: this implementation is unofficial
> Note: this implementation is unofficial
new_line
new_line
text
This implementation is designed to handle virtually infinite context lengths.
This implementation is designed to handle virtually infinite context lengths.
new_line
new_line
text
Here's the github repo: 
Here's the github repo: 
link
https://github.com/Beomi/InfiniTransformer
https://github.com/Beomi/InfiniTransformer
new_line
new_line
text
📄 **Read the original Paper:** 
📄 **Read the original Paper:** 
link
https://arxiv.org/abs/2404.07143
https://arxiv.org/abs/2404.07143
new_line
new_line
text
## **Focus on Infini-Attention**
## **Focus on Infini-Attention**
new_line
new_line
text
- **2 Types of Implementation available:** Attention-layer only implementation / Model & Train-wise implementation
- **2 Types of Implementation available:** Attention-layer only implementation / Model & Train-wise implementation
new_line
text
- **Fixed(segment dependent) Memory Usage:** Enables training on larger models and longer sequences without the memory overhead typical of standard Transformer implementations.
- **Fixed(segment dependent) Memory Usage:** Enables training on larger models and longer sequences without the memory overhead typical of standard Transformer implementations.
new_line
text
- **Infinite Context Capability:** Train with unprecedented sequence lengths—imagine handling up to 1 million sequence lengths on standard hardware!
- **Infinite Context Capability:** Train with unprecedented sequence lengths—imagine handling up to 1 million sequence lengths on standard hardware!
new_line
text
  - You could train Gemma-2B with 1M sequence length with 2K segmentation size with single H100 GPU.
  - You could train Gemma-2B with 1M sequence length with 2K segmentation size with single H100 GPU.
new_line
new_line
text
## **Try InfiniTransformer**
## **Try InfiniTransformer**
new_line
new_line
text
1. **Clone the repository:**
1. **Clone the repository:**
new_line
text
inline_code
``
inline_code
`bash
   git clone https://github.com/Beomi/InfiniTransformer
   `
bash
   git clone https://github.com/Beomi/InfiniTransformer
   
inline_code
``
new_line
text
2. **Install necessary tools:**
2. **Install necessary tools:**
new_line
text
inline_code
``
inline_code
`bash
   pip install -r requirements.txt
   pip install -e git+https://github.com/huggingface/transformers.git@b109257f4f#egg=transformers
   `
bash
   pip install -r requirements.txt
   pip install -e git+https://github.com/huggingface/transformers.git@b109257f4f#egg=transformers
   
inline_code
``
new_line
text
3. **Dive Deep into Custom Training:**
3. **Dive Deep into Custom Training:**
new_line
text
   - Train with extensive sequence lengths using scripts such as 
   - Train with extensive sequence lengths using scripts such as 
inline_code
`./train.gemma.infini.noclm.1Mseq.sh`
./train.gemma.infini.noclm.1Mseq.sh
text
.
.
new_line
new_line
text
for more detailed info, please visit Repo: 
for more detailed info, please visit Repo: 
link
https://github.com/Beomi/InfiniTransformer
https://github.com/Beomi/InfiniTransformer
new_line
new_line
text
Look forward to see your feedbacks! 😊
Look forward to see your feedbacks! 😊
new_line
new_line
text
ps. Training loss plot is here 😉
ps. Training loss plot is here 😉
🚀 **InfiniTransformer, Gemma/Llama3 based Implementation!** 🌌

> Update @ 2024.04.19: It now supports Llama-3!

> Note: this implementation is unofficial

This implementation is designed to handle virtually infinite context lengths.

Here's the github repo: https://github.com/Beomi/InfiniTransformer

📄 **Read the original Paper:** https://arxiv.org/abs/2404.07143

## **Focus on Infini-Attention**

- **2 Types of Implementation available:** Attention-layer only implementation / Model & Train-wise implementation
- **Fixed(segment dependent) Memory Usage:** Enables training on larger models and longer sequences without the memory overhead typical of standard Transformer implementations.
- **Infinite Context Capability:** Train with unprecedented sequence lengths—imagine handling up to 1 million sequence lengths on standard hardware!
  - You could train Gemma-2B with 1M sequence length with 2K segmentation size with single H100 GPU.

## **Try InfiniTransformer**

1. **Clone the repository:**
   ```bash
   git clone https://github.com/Beomi/InfiniTransformer
   ```
2. **Install necessary tools:**
   ```bash
   pip install -r requirements.txt
   pip install -e git+https://github.com/huggingface/transformers.git@b109257f4f#egg=transformers
   ```
3. **Dive Deep into Custom Training:**
   - Train with extensive sequence lengths using scripts such as `./train.gemma.infini.noclm.1Mseq.sh`.

for more detailed info, please visit Repo: https://github.com/Beomi/InfiniTransformer

Look forward to see your feedbacks! 😊

ps. Training loss plot is here 😉
🚀
tomaarsen maywell lunarflu hllj Joseph717171 genne HyeonjinXZ
🔥
flozi00 raidhon Joseph717171 sosoai
👍
gangyeolkim Joseph717171 nebchi
https://cdn-avatars.huggingface.co/v1/production/uploads/6317233cc92fd6fee317e030/cJHSvvimr1kqgQfHOjO5n.png
Tom Aarsen
tomaarsen
user
https://cdn-avatars.huggingface.co/v1/production/uploads/5e56829137cb5b49818287ea/8HYzJeRc4b9Wu7BfJwibS.png
Lee Junbum
beomi
user