Skip to main content

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


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.20.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astra_llm-0.1.20-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file astra-llm-0.1.20.tar.gz.

File metadata

  • Download URL: astra-llm-0.1.20.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for astra-llm-0.1.20.tar.gz
Algorithm Hash digest
SHA256 989855989cfe2da612b73c59936fe02e4036ef137fa5ded582625c375996dbc5
MD5 677cdb076c6499de9b80dc0a2dd0f145
BLAKE2b-256 9375ea56101a2003b70d1b873770c1ee37a395a74ab8fe5c39ab3a3ba2402406

See more details on using hashes here.

File details

Details for the file astra_llm-0.1.20-py3-none-any.whl.

File metadata

  • Download URL: astra_llm-0.1.20-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

Hashes for astra_llm-0.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 71deb6d459eb9c105ed599c219b44b61de03bfc178c48ecac0e8fa6ea4411fe4
MD5 b52efc4dd4e3d072cb4f59cbab855d0a
BLAKE2b-256 668145e10e92653debbb5982b324e35cc4c7c177e44fc449d01ea0cf8ac8078e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page