Astra is a lightweight library for Astra LLM.
Project description
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
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
astra-llm-0.1.21.tar.gz
(5.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astra-llm-0.1.21.tar.gz.
File metadata
- Download URL: astra-llm-0.1.21.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfae4083b4433d79a044400ed7ca97f291ac63fba6b2f9621c1854ee540a1903
|
|
| MD5 |
a64f6640937b323ca2873e693404c4e8
|
|
| BLAKE2b-256 |
5246dfcfce110393f7a49376ff3a2447cbf2cf6a69ad6cc75b7267fe9a8f165e
|
File details
Details for the file astra_llm-0.1.21-py3-none-any.whl.
File metadata
- Download URL: astra_llm-0.1.21-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acd3c95654d8043c999a9f34ba4fb36ef97c2988ae6c287155cba39067505edd
|
|
| MD5 |
261623d8243f34c8aaf38a3187b22ac4
|
|
| BLAKE2b-256 |
9f8160d08b161fb2819c7956d139289db59ddbd56529142e0d632fd1825f62eb
|