File size: 1,218 Bytes
ee0d44a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# Llamba Models
The Llamba models are part of Cartesia's [Edge](https://github.com/cartesia-ai/edge) library, designed for efficient, high-performance machine learning applications.
For more details, refer to the [paper](#).
---
## Usage
### Llamba on PyTorch
To use Llamba with PyTorch:
1. Install the required package:
```bash
pip install --no-binary :all: cartesia-pytorch
```
2. Load and run the model
```python
from transformers import AutoTokenizer
from cartesia_pytorch.Llamba.llamba import LlambaLMHeadModel
model = LlambaLMHeadModel.from_pretrained("AvivBick/Llamba-3B", strict=True).to('cuda')
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B")
input_ids = tokenizer("Hello, my name is", return_tensors="pt").input_ids
input_ids = input_ids.to('cuda')
output = model.generate(input_ids, max_length=100)[0]
print(tokenizer.decode(output, skip_special_tokens=True))
```
### Llamba on MLX
To run Llamba with the Metal framework:
_(Add specific instructions here when available.)_
---
### Evaluations
Details on model performance, benchmarks, and evaluation metrics can be found in the [paper link](#).
_(Expand on this section if specific results or datasets are available.)_ |