Skip to main content

Using MultiGraph to enchance LLM-based agent memory

Project description

HiMGA

Tests Docs PyPI

HiMGA is a Hierarchical Multi-Graph Architecture for conversational memory.

Installation

User

Core install — includes exact_match, F1, ROUGE, BLEU, METEOR:

pip install himga

Full eval metrics — adds BERTScore and Sentence-BERT:

pip install "himga[eval]"

GPU acceleration (BERTScore / SBERT auto-detect CUDA, no code changes needed):

# Install CUDA-compatible PyTorch first, then eval extras
pip install torch --index-url https://download.pytorch.org/whl/cu118
pip install "himga[eval]"

Contributor

Project uses uv for dependency management.

git clone https://github.com/colehank/HiMGA
cd HiMGA
uv sync --dev                  # installs all deps including eval extras
uv run pre-commit install --hook-type pre-commit --hook-type pre-push --hook-type commit-msg

Copy .env_example to .env and fill in the required values.

Running tests:

uv run pytest tests/            # fast tests only (default)
uv run pytest tests/ --run-slow # include BERTScore / SBERT model tests
uv run pytest tests/ --run-integration  # include real API calls (requires .env)

Releasing to PyPI:

git tag vx.x.x
git push origin vx.x.x          # triggers build + publish to PyPI

Benchmarks

HiMGA is evaluated on locomo and longmemeval. Set DATASETS_ROOT in .env (defaults to .cache/datasets) to the directory where datasets exist or should be downloaded.

from himga.utils import get_dataset

locomo   = get_dataset("locomo")       # downloads if not found locally, returns local path
longmem  = get_dataset("longmemeval")

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

himga-0.0.1.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

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

himga-0.0.1-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file himga-0.0.1.tar.gz.

File metadata

  • Download URL: himga-0.0.1.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for himga-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fee0b87313c12ae2042b42f27e24c3c621f07922f2e4946e456d3e7e696a9a90
MD5 5f1d1aa8811ba4f1cf352556b841938a
BLAKE2b-256 0c14240ed00a7a933311458ce9b107ed92b5041eeca8e5bda8b7a719cbc02bba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: himga-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for himga-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a1407f775ba86093c8ea764c6860489228b3519261698b6f0b547f89abe29a3
MD5 04aaee573f9484cb9cbb026477a0233d
BLAKE2b-256 08a3aa894e8cd57bacd5c79c06c1d46b903eb81faf08bae64fe96d1b26d3d0c4

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