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