Skip to main content

Zero-friction GPU bootstrap for llama-cpp-python on Windows.

Project description

easyllama

Small helper package so your llama_cpp scripts can stay short while still using GPU.

What it does

  • Adds CUDA DLL folders to runtime search path automatically
  • Detects pip-installed NVIDIA runtime DLL folders inside the active venv
  • Forces dedicated GPU usage defaults for llama_cpp.Llama (unless you override)

Install (new laptop / fresh Windows)

  1. Install CUDA-enabled llama-cpp-python in your venv:
python -m pip install --upgrade --force-reinstall --no-cache-dir llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu124
  1. Install this package:
cd "C:\Users\divid\Desktop\Data analytics\easyllama"
python -m pip install -e .

Use

from easyllama import Llama

llm = Llama(
    model_path=r"C:\AI\Model\Qwen3-4B.Q4_K_M.gguf",
    n_ctx=2048,
)

n_gpu_layers=-1, main_gpu=0, and offload_kqv=True are auto-set unless you pass your own values. Also, logs are quiet by default (verbose=False, no_perf=True) so CUDA graph spam does not flood your terminal.

If you want debug logs back:

$env:LLAMA_VERBOSE="1"
$env:LLAMA_NO_PERF="0"

Quick check

python -m easyllama

PyPI Trusted Publishing (GitHub Actions)

This repo includes:

  • .github/workflows/publish.yml

How to enable:

  1. Push this project to GitHub.
  2. On PyPI, configure Trusted Publishing:
    • If easyllama does not exist yet: use account settings -> Publishing -> add a pending publisher for easyllama.
    • If easyllama already exists: open project settings -> Publishing -> add a publisher.
  3. Fill with your GitHub details:
    • Owner: your GitHub username/org
    • Repository: your repo name
    • Workflow name: publish.yml
    • Environment name: pypi
  4. Create and push a version tag like v1.0.0.
  5. GitHub Actions publishes automatically to PyPI using OIDC (no API token needed).

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

easyllama_divi845-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

easyllama_divi845-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file easyllama_divi845-1.0.0.tar.gz.

File metadata

  • Download URL: easyllama_divi845-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for easyllama_divi845-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3b07ed9b96c254a95bba02a016424a0867a99cc99e90cf0114be002bc7509ecd
MD5 bdbe72f373dfbfbffd91ef1f75b412e2
BLAKE2b-256 53a2efacdceaa4310b1f7df5ae6b5bc0d5aa7614c93200cb660d0e5f092ff17b

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyllama_divi845-1.0.0.tar.gz:

Publisher: publish.yml on Divi845/Python-Libraries

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easyllama_divi845-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for easyllama_divi845-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cff25937de22d046674797995c5bbe737e018e4922471cc19859c15ff36a1ab
MD5 ca5a56358c935f75f753ab9537cec1bf
BLAKE2b-256 720fc5dfd339e64fa47d680b87fb37ca546d72f7114ebf9be1488bec00324953

See more details on using hashes here.

Provenance

The following attestation bundles were made for easyllama_divi845-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Divi845/Python-Libraries

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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