Skip to main content

The LLMs Index. Download LLMs to use locally.

Project description

Illustration by Sean Sinclair on Unplash.


Unplash / Sean Sinclair

getllms - 0.4

The LLMs index. Uses the LMStudio Catalog.

$ pip install getllms


List All LLMs.

List all LLMs available for use. Selected for you.

import getllms

models = getllms.list_models()
Output

[
    Model(
        name='Samantha 1.1 7B',
        description='Samantha has been trained in philos…',
        files=[ (2) ]
    ),
    Model(
        name='Redmond-Puffin-13B-V1.3',
        description='Redmond-Puffin-13B is one of the wo…',
        files=[ (1) ]
    )
]


See Trained LLMs.

Get the trained ones for a specific model. Select the one that meets your system requirements.

models[0].files # trained samantha 1.1 7b
Output & More

Output

FileCollection(
    best=ModelFile(
        name='samantha-1.1-llama-7b.ggmlv3.q6_K.bin',
        size=5528904320,
        url='https://huggingface.co/TheBlok…'
    ),
    +1
)

More

Additionally, you can see all the available model files:

models[0].files.all # [ ModelFile(name='samantha-1.1-llama-…'), … ]


Download LLMs.

Download the LLM that's right for you.

best = models[0].files.best
best.download()
Output

Downloading... 116.44MB / 5.15GB (2.00%)


Illustration by Milad Fakurian on Unplash.


More

User guides, and many more.

Learn how to master getllms in under five minutes.


Table of Contents

TOC

  1. Updating the Catalog
  2. Dataclasses

Updating the Catalog

When getllms is downloaded, the index file is automatically installed inside of getllms.data and is already compressed.

You can get the latest version of the model catalogue using:

from getllms import download_model_data, erase_data

erase_data(reload=True) # erase the previous version
download_model_data() # download the latest ones

# now list all the models.

Dataclasses

Below is a list of attributes of the dataclasses (from getllms.model).

Model

Represents the info of an LLM model.

class Model:
    name: str
    date_published: str
    description: str
    author: dict[str, str]
    n_params: str # (e.g., 7B)
    canonical_url: str
    download_url: str # note: NOT the raw file
    trained_for: Literal['chat', 'instruct', 'other']
    files: ModelFileCollection

ModelFileCollection

A set of model files.

class ModelFileCollection:
    all: List[ModelFile]
    most_capable: ModelFile
    best: ModelFile # (alias: most_capable)
    economical: ModelFile

find()

Find a model file by name.

Args:

  • name (str): The name.
def find(self, name: str) -> ModelFile

ModelFile

A model file.

class ModelFile:
    name: str
    url: str
    size: int
    quantization: str
    format: Literal['ggml', 'gguf']
    publisher: dict[str, str]

download()

Download the model.

Args:

  • to (str, optional): The file destination.
def download(self, *, to: Optional[str] = None)

© 2023 AWeirdDev, Catalog by LMStudio

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

getllms-0.4.tar.gz (38.7 kB view hashes)

Uploaded Source

Supported by

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