Portable memory format for large language models.
tqk serializes compressed KV-cache tensors into a portable .tqk file so context can be transferred across model sessions and architectures.
Core goals:
- preserve expensive prefill work
- reduce repeated token processing
- standardize memory exchange format
Current recommended path is source install:
git clone https://github.com/RemizovDenis/tqk-llm.git
cd tqk-llm
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e ".[dev,transformers]"Note: the package name is being moved to tqk-llm to avoid conflict with an unrelated existing tqk package on PyPI.
from tqk.turboquant_bridge import TQKPipeline
pipeline = TQKPipeline(source_model, tokenizer)
pipeline.save_context("Your long technical documentation...", "memory.tqk")
target_model = pipeline.load_context("memory.tqk", target_model, target_tokenizer)tqk info memory.tqk
tqk validate memory.tqk
tqk benchmark --layers 8 --heads 4 --seq-len 512 --head-dim 64Reference benchmark and validation assets:
tqk benchmark writes local artifacts:
tqk_benchmark.jsontqk_benchmark.md
Business Source License 1.1 (BUSL-1.1). Non-commercial use is free. Commercial use requires a license agreement. Converts to Apache-2.0 on 2030-04-01.