Skip to content

RemizovDenis/tqk-llm

tqk

CI Release Python 3.9+ License BUSL-1.1

Portable memory format for large language models.

What it does

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

Installation

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.

Quick start

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)

CLI

tqk info memory.tqk
tqk validate memory.tqk
tqk benchmark --layers 8 --heads 4 --seq-len 512 --head-dim 64

Benchmarks

Reference benchmark and validation assets:

tqk benchmark writes local artifacts:

  • tqk_benchmark.json
  • tqk_benchmark.md

Project standards

License

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.

About

Portable memory format for LLMs. Store and transfer compressed KV-caches between model architectures without re-computation. Built on TurboQuant-MoE. (Портативный формат памяти для LLM. Храните и передавайте сжатые KV-кэши между архитектурами моделей без пересчета. Построено на TurboQuant-MoE.)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors