Skip to main content

More for Keys, Less for Values: Adaptive KV Cache Quantization ☝️🔑👇🔢

Installation

To install the package, use pip:

pip install kvq

Usage

To use the package, import it in your Python code:

import kvq

medviz.layered_plot(image_path="dataset/1-1.nii", mask_paths=["dataset/small_bowel.nii", "dataset/1-1-label.nii"], mask_colors=["red", "yellow"], title="Layered Plot")

The layered_plot function creates a layered plot of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting plot can be used to visualize the location of structures or regions of interest in the image.

import medviz

medviz.gif(
    image_path="dataset/1-1.nii",
    mask_paths=[
        "dataset/small_bowel.nii",
        "dataset/1-1-label.nii",
        "dataset/vertebrae_L3.nii.gz",
        "dataset/vertebrae_L4.nii.gz",
        "dataset/vertebrae_L5.nii.gz",
    ],
    mask_colors=["red", "yellow", "green", "blue", "purple"],
    title="Expert Annotations",
    interval=70,
    start_slice=30,
    end_slice=130,
    save_path="animation.gif",
)

The gif function creates an animated GIF of an image and one or more masks. The masks are overlaid on top of the image using the specified colors. The resulting GIF can be used to visualize the location of structures or regions of interest in the image.

GitHub repository: https://github.com/mohsenhariri/kvq

Metadata

Release files for kvquant 0.0.1

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

Source distribution (sdist)

Source distribution for kvquant 0.0.1
File Size Uploaded
kvquant-0.0.1.tar.gz 15.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kvquant 0.0.1
File Interpreter ABI Platform
kvquant-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.3 kB

Release files / kvquant-0.0.1.tar.gz

Download URL kvquant-0.0.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0212cf16559775a3ead1bbd17291537827d3fa1a12fc7a74f040d8168788c8d9
BLAKE2b-256 checksum
How to use checksums
2e5effe798a412d038c5a6b045f247aac5dd6859eeac034cfbe1548a640927c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / kvquant-0.0.1-py3-none-any.whl

Download URL kvquant-0.0.1-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0407337ca40b1bb519c54d35426dbb764faf583fa8bea711cbfa060bc8a30c82
BLAKE2b-256 checksum
How to use checksums
2cc527df01902936588c338f373d0ba765207efc6fef6e3542fb2e9902fad4b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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