Skip to main content

LLaMA: Open and Efficient Foundation Language Models

Project description

LLaMA

This repository is intended as a minimal, hackable and readable example to load LLaMA models and run inference. In order to download the checkpoints and tokenizer, fill this google form

Installation

pip install pyllama

Download

Once your request is approved, you will receive links to download the tokenizer and model files. Edit the download.sh script with the signed url provided in the email to download the model weights and tokenizer. The download process can also be automated by setting the respective environmental variables (PRESIGNED_URL and TARGET_FOLDER).

Inference

The provided example.py can be run on a single or multi-gpu node with torchrun and will output completions for two pre-defined prompts. Using TARGET_FOLDER as defined in download.sh:

torchrun --nproc_per_node MP example.py --ckpt_dir $TARGET_FOLDER/model_size --tokenizer_path $TARGET_FOLDER/tokenizer.model

Different models require different MP values:

Model MP
7B 1
13B 2
30B 4
65B 8

Model Card

See MODEL_CARD.md.

License

See the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pyllama-0.0.1-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file pyllama-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyllama-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8

File hashes

Hashes for pyllama-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8ed8d85de938d940c2447f2658c5034f6cbe5ab133111419c1119b59315eef6
MD5 b8af0e6a187ac4d045c51902dca0414a
BLAKE2b-256 a160228356517ce4656b48d1b6eb917191c580b2831691ac14af412ac548943e

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