More for Keys, Less for Values: Adaptive KV Cache Quantization 🐍🚀🎉🦕
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kvquant-0.0.1.tar.gz.
File metadata
- Download URL: kvquant-0.0.1.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0212cf16559775a3ead1bbd17291537827d3fa1a12fc7a74f040d8168788c8d9
|
|
| MD5 |
e4f620dc278018914fcf223a368f8457
|
|
| BLAKE2b-256 |
2e5effe798a412d038c5a6b045f247aac5dd6859eeac034cfbe1548a640927c4
|
File details
Details for the file kvquant-0.0.1-py3-none-any.whl.
File metadata
- Download URL: kvquant-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0407337ca40b1bb519c54d35426dbb764faf583fa8bea711cbfa060bc8a30c82
|
|
| MD5 |
db319d617ca720a32f0c6615dd5b23bc
|
|
| BLAKE2b-256 |
2cc527df01902936588c338f373d0ba765207efc6fef6e3542fb2e9902fad4b3
|