Welcome to Andromeda, The Fastest, Most Creative, and Reliable Language Model Ever Built, train your own verison, conduct inference, and finetune your own verison with simple plug in and play scripts get started in 10 seconds:
- 💼 Handle Ultra Long Sequences (32,000-200,000+ context lengths)
- ⚡ Ultra Fast Processing (32,000+ tokens in under 100ms)
- 🎓 Superior Reasoning Capabilities
- Efficiency: Optimize with techniques like attention flashing, rotary position encodings, and deep normalization.
- Flexibility: Adapt to various tasks and domains for wide applications.
- Scalability: Designed to scale with resources and data sizes.
- Community-Driven: Thrives on contributions from the open-source community.
python3.11 -m pip install --upgrade andromeda-torch
- Forward pass with random inputs
import torch
from andromeda.configs import Andromeda1Billion
model = Andromeda1Billion()
x = torch.randint(0, 256, (1, 1024)).cuda()
out = model(x) # (1, 1024, 20000)
print(out)
- Tokenized inputs
from andromeda_torch import Tokenizer
from andromeda_torch.configs import Andromeda1Billion
model = Andromeda1Billion()
tokenizer = Tokenizer()
encoded_text = tokenizer.encode("Hello world!")
out = model(encoded_text)
print(out)
-
Set the environment variables:
ENTITY_NAME
: Your wandb project nameOUTPUT_DIR
: Directory to save the weights (e.g.,./weights
)MASTER_ADDR
: For distributed trainingMASTER_PORT
For master port distributed trainingRANK
- Number of nodes servicesWORLD_SIZE
Number of gpus
-
Configure the training:
- Accelerate Config
- Enable Deepspeed 3
- Accelerate launch train_distributed_accelerate.py
For more information, refer to the Training SOP.
- Add Yarn Embeddings from zeta
- Andromeda utilizes one of the most reliable Attentions ever, flash attention 2.0 Triton. It consumes 50x less memory than GPT-3 and 10x less than LLAMA.
- We can speed this up even more with dynamic sparse flash attention 2.0.
Apache License