Skip to main content

gguf_llama

Provides a LlamaAI class with Python interface for generating text using Llama models.

Features

  • Load Llama models and tokenizers automatically from gguf file
  • Generate text completions for prompts
  • Automatically adjust model size to fit longer prompts up to a specific limit
  • Convenient methods for tokenizing and untokenizing text
  • Fix text formatting issues before generating

Usage

from llama_ai import LlamaAI

ai = LlamaAI("my_model.gguf", max_tokens=500, max_input_tokens=100)"

Generate text by calling infer():

text = ai.infer("Once upon a time")  
print(text)"

Installation

pip install gguf_llama

Documentation

See the API documentation for full details on classes and methods.

Contributing

Contributions are welcome! Open an issue or PR to improve gguf_llama.

Metadata

Release files for gguf-llama 0.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gguf-llama 0.0.18
File Size Uploaded Provenance Actions
gguf_llama-0.0.18.tar.gz 4.6 kB Without provenance Details for gguf_llama-0.0.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gguf-llama 0.0.18
File Interpreter ABI Platform Actions
gguf_llama-0.0.18-py3-none-any.whl Python 3 none any Details for gguf_llama-0.0.18-py3-none-any.whl

Total release size: 9.3 kB

Release files / gguf_llama-0.0.18.tar.gz

Download URL gguf_llama-0.0.18.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
485c467705699bcc7f4f77034167a33ae4380da73bb10ac5ca93817cbc87fdde
BLAKE2b-256 checksum
How to use checksums
c294548a808b940863e91e4a377d9765d4ca5966e02112602d36b275ad1c2682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / gguf_llama-0.0.18-py3-none-any.whl

Download URL gguf_llama-0.0.18-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77f0ae941b1cf4766c25b5071ad718ceab8a31abb0dd28e852227c76785e8596
BLAKE2b-256 checksum
How to use checksums
07bd9a12ace7bdfc65d458c0d9a19c6394172bd187e779dcb865bb70364120c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for gguf-llama 0.0.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page