==============
kvq
==============
More for Keys, Less for Values: Adaptive KV Cache Quantization ☝️🔑👇🔢
Installation
------------
To install the package, use pip:
.. code-block:: bash
pip install kvq
Usage
-----
To use the package, import it in your Python code:
.. code-block:: python
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.
.. code-block:: python
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
Raw data
{
"_id": null,
"home_page": null,
"name": "kvquant",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Large Language Models, Cache, Quantization, Compression, Optimization",
"author": null,
"author_email": "Mohsen Hariri <mohsen.hariri@case.edu>",
"download_url": "https://files.pythonhosted.org/packages/2e/5e/ffe798a412d038c5a6b045f247aac5dd6859eeac034cfbe1548a640927c4/kvquant-0.0.1.tar.gz",
"platform": null,
"description": "==============\nkvq\n==============\n\nMore for Keys, Less for Values: Adaptive KV Cache Quantization \u261d\ufe0f\ud83d\udd11\ud83d\udc47\ud83d\udd22\n\n\nInstallation\n------------\n\nTo install the package, use pip:\n\n.. code-block:: bash\n\n pip install kvq\n\n\nUsage\n-----\n\nTo use the package, import it in your Python code:\n\n.. code-block:: python\n\n import kvq\n\n 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\")\n\nThe `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.\n\n\n.. code-block:: python\n\n import medviz\n\n medviz.gif(\n image_path=\"dataset/1-1.nii\",\n mask_paths=[\n \"dataset/small_bowel.nii\",\n \"dataset/1-1-label.nii\",\n \"dataset/vertebrae_L3.nii.gz\",\n \"dataset/vertebrae_L4.nii.gz\",\n \"dataset/vertebrae_L5.nii.gz\",\n ],\n mask_colors=[\"red\", \"yellow\", \"green\", \"blue\", \"purple\"],\n title=\"Expert Annotations\",\n interval=70,\n start_slice=30,\n end_slice=130,\n save_path=\"animation.gif\",\n )\n\nThe `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.\n\nGitHub repository: https://github.com/mohsenhariri/kvq\n",
"bugtrack_url": null,
"license": "GPL-3.0 License",
"summary": "More for Keys, Less for Values: Adaptive KV Cache Quantization \ud83d\udc0d\ud83d\ude80\ud83c\udf89\ud83e\udd95",
"version": "0.0.1",
"project_urls": null,
"split_keywords": [
"large language models",
" cache",
" quantization",
" compression",
" optimization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2cc527df01902936588c338f373d0ba765207efc6fef6e3542fb2e9902fad4b3",
"md5": "db319d617ca720a32f0c6615dd5b23bc",
"sha256": "0407337ca40b1bb519c54d35426dbb764faf583fa8bea711cbfa060bc8a30c82"
},
"downloads": -1,
"filename": "kvquant-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "db319d617ca720a32f0c6615dd5b23bc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 14336,
"upload_time": "2025-02-27T20:12:36",
"upload_time_iso_8601": "2025-02-27T20:12:36.598392Z",
"url": "https://files.pythonhosted.org/packages/2c/c5/27df01902936588c338f373d0ba765207efc6fef6e3542fb2e9902fad4b3/kvquant-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2e5effe798a412d038c5a6b045f247aac5dd6859eeac034cfbe1548a640927c4",
"md5": "e4f620dc278018914fcf223a368f8457",
"sha256": "0212cf16559775a3ead1bbd17291537827d3fa1a12fc7a74f040d8168788c8d9"
},
"downloads": -1,
"filename": "kvquant-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "e4f620dc278018914fcf223a368f8457",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 14980,
"upload_time": "2025-02-27T20:12:37",
"upload_time_iso_8601": "2025-02-27T20:12:37.709537Z",
"url": "https://files.pythonhosted.org/packages/2e/5e/ffe798a412d038c5a6b045f247aac5dd6859eeac034cfbe1548a640927c4/kvquant-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-27 20:12:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "kvquant"
}