Metadata-Version: 2.1
Name: astra-llm
Version: 0.1.20
Summary: Astra is a lightweight library for Astra LLM.
Home-page: https://github.com/shuvo881/Astra
Author: Md. Golam Mostofa
Author-email: golammostofa10001@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certifi==2024.8.30
Requires-Dist: charset-normalizer==3.4.0
Requires-Dist: filelock==3.16.1
Requires-Dist: fsspec==2024.10.0
Requires-Dist: idna==3.10
Requires-Dist: Jinja2==3.1.4
Requires-Dist: MarkupSafe==3.0.2
Requires-Dist: mpmath==1.3.0
Requires-Dist: networkx==3.4.2
Requires-Dist: numpy==1.26.4
Requires-Dist: regex==2024.11.6
Requires-Dist: requests==2.32.3
Requires-Dist: sympy==1.13.3
Requires-Dist: tiktoken==0.8.0
Requires-Dist: torch==2.2.2
Requires-Dist: typing-extensions==4.12.2
Requires-Dist: urllib3==2.2.3

# Check Python version
**N.B: python version must be required up to 3.10.0**

`!python --version`


# Install dependencies of Astra LLM
`pip install astra-llm==0.1.19`

# Load Model

### Selection of device for load model
```
import torch

# Set device to GPU if available
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

```

### Load model
```
from astra.model import Model

model = Model('/kaggle/input/astra/pytorch/1.4b/2', map_location=device)
```

# Generate text

```
response = model.generate(
    messages="hello",
    max_new_tokens=50,
    top_k=25,
    temperature=1.4
)
```
