Context portfolio optimizer for LLMs with compression, convergence loops, validation gates, and wave scheduling.
Project description
ContextFission (PyPI)
ContextFission is a context compiler for LLM workflows. It ingests source context, retrieves and scores blocks, selects under token budget, applies attention-based fusion, and assembles provider-ready packets.
Install
Base package:
pip install context-fission
With local decoder support (model download + transformers stack):
pip install "context-fission[local-models]"
Notes:
torchwheels are available for Python <= 3.13 on most platforms.- On Python 3.14, install local-model dependencies manually once wheels are available.
CLI
Show version:
context-fission version
Compress text file:
context-fission compress input.md --intensity medium
Validate compression:
context-fission validate original.md compressed.md
Run pipeline:
context-fission pipeline ./data --query "incident response" --budget 4096
Run web UI:
context-fission ui --host 127.0.0.1 --port 8080
Download local model:
context-fission download-model google/flan-t5-base
context-fission download-model Qwen/Qwen2.5-0.5B-Instruct --ignore-patterns "flax*,tf_*"
Local Decoder Runtime
Set model and mode:
export CONTEXTFISSION_LOCAL_DECODER_MODEL=Qwen/Qwen2.5-0.5B-Instruct
export CONTEXTFISSION_CAVEMAN_IO=true
Then use Python API or provider-backed pipeline paths.
Python API Example
from context_fission.orchestration.runner import PipelineRunner
runner = PipelineRunner(token_budget=3000)
result = runner.run("./docs/notes.md", query="auth flow", mode="compact", compress=True)
print(result["selected_blocks"])
print(result["total_tokens"])
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 context_fission-1.0.0.tar.gz.
File metadata
- Download URL: context_fission-1.0.0.tar.gz
- Upload date:
- Size: 183.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98c04ca42bed1f1f7952518f09cd25ef9f7005f416e58a7e10f63b12f07166f0
|
|
| MD5 |
08c9eb959e2d6f9f978dbbe264214ea1
|
|
| BLAKE2b-256 |
b189cc115631a4524358dbcf4e0fea2a5816054149e7315e0c7a9c85e6ce1850
|
File details
Details for the file context_fission-1.0.0-py3-none-any.whl.
File metadata
- Download URL: context_fission-1.0.0-py3-none-any.whl
- Upload date:
- Size: 170.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3875c403c316647f232867c2bc4d00cbd3204b6ac0a4f9d82fa48933aedc11c
|
|
| MD5 |
827c3d2cb5f2296a986c1e51146c5abe
|
|
| BLAKE2b-256 |
7df523e5edf11f519210d0fcabf97434e4fed080aecce4ead8eee0149f48dfda
|