[go: up one dir, main page]

Cut AI coding-agent token cost up to 95%

Paritok is an open-source 4B code-semantic compression model. It shrinks the context your agent sends to Claude / GPT up to 95% — keeping function signatures, imports, paths and errors intact — at GPT-4.1-mini / GPT-5 level task accuracy.

🤗 Download model

free for self-host or $0 / token during the limited-time launch use our hosted GPU endpoint.

agent → paritok proxy → upstream LLM (typically workflow)
Raw context15,000 tokens
[SEG kind=file_read] src/payments/refund.py
def process_refund(order_id, amount, reason=None):
    """Full 120-line implementation with docstrings,
    imports, helper functions, inline comments, type
    hints, logging calls, and error handling ..."""
    import logging
    logger = logging.getLogger(__name__)
    order = Order.objects.get(id=order_id)
    if order.status != 'paid':
        logger.warning('refund on unpaid order %s', order_id)
        raise InvalidRefund(order_id)
    ...  (and 6 more files, full bash logs, stack traces)
Paritok output3,850 tokens
[SEG kind=file_read] src/payments/refund.py
process_refund(order_id, amount, reason=None)
  -> guards order.status=='paid' else InvalidRefund
  -> logs warning on unpaid; uses Order.objects.get
signatures + imports + paths preserved.
6 files compressed, stack traces kept verbatim.

# semantics intact → agent still solves the task
74%
Context removed
0.257
Compression ratio
92%
Info retained
$0
Per token · free launch

A middle-layer proxy

Drop it between your agent and the API

No retraining, no prompt surgery. Point your agent at the Paritok proxy and it compresses every turn on the way up.

Your Agent
raw
Paritok proxy
compressed
Anthropic / OpenAI
billed on compressed
01

Your agent sends raw context

Claude Code, Cursor, Copilot, OpenHands or your own SDK emits its usual multi-file, multi-turn trajectory — often 8–30K tokens per turn.

02

Paritok compresses each turn

The 4B model rewrites each segment, dropping boilerplate while preserving signatures, imports, file paths, line numbers and error messages.

03

Upstream LLM is billed on less

Compressed prompts flow to Anthropic / OpenAI; original responses flow back unchanged. You pay for a fraction of the input tokens.

Honest, OOD-holdout benchmark

2× tighter than GPT prompt compression. Same accuracy, $0 per token.

GPT-based prompt compression bills you per token, every turn. Paritok is an open 4B model you self-host — free.

74%
content compressed away
92%
task-relevant info kept
$0
per-token compression fee
Paritok-4B-v1LLMLingua-2gpt-4.1-mini(prompt)
Trained on real coding-agent trajectories
Preserves function names / imports / paths
Compression rate(lower = harder)25.7%~40%50.2%
SWE-bench quality retained86.5%85.6%
Open weightsApache-2.0MIT
Per-token fee✓ Free✓ Free$ Paid

Compression ratio(compressed ÷ original · lower is better)

Paritok-4B-v10.257
LLMLingua-20.400
gpt-4.1-mini0.502
gpt-50.619

Note: In production, a middleware monitors compression quality in real time and repairs any loss on the fly. Your coding agent gets effectively lossless results.

Cost impact

Cut your input token bill typical 74% saving

Input cost per turn · Claude Sonnet ($3 / 1M in)
Turn input sizeUncompressedWith Paritok
Short (8K)$0.024$0.006
Typical (15K)$0.045$0.012
Long session (30K)$0.090$0.023

Estimate your own project

Drag the sliders to model your team's input spend before vs. after compression.

Try a scenario
Developers10
Turns / dev / day400
Avg input tokens / turn15K
Project days20
Estimated savings over 20 days
$2,675
off your input token bill
Input spend (before)
$3,600
Input spend (after)
$925
Input / turn (before)
$0.0450
Input / turn (after)
$0.0116
891.6M input tokens saved — a smaller, cheaper prompt on every turn.

Illustrative estimate. Real savings depend on how much of your context is compressible history vs. fresh instructions.

Everything in the box

Built for real agent workloads

🧩

Code-semantic aware

Preserves function signatures, imports, class names, file paths, line numbers and error messages — the tokens agents actually reason over.

🔓

Fully open weights

Apache-2.0 LoRA adapter on Qwen3-4B. Reproducible data pipeline, raw eval numbers checked in. No black box.

🪶

Small & self-hostable

4B, runs on a single 8GB GPU. A smaller, cheaper prompt goes upstream on every turn.

🔌

Provider-agnostic proxy

Sits between your agent and Anthropic, OpenAI, or any OpenAI-compatible endpoint. Works with Claude Code, Cursor, Copilot, OpenHands.

🛡️

Production safeguards

Format checks, target-identifier presence checks, and a per-session toggle to fall back to raw context when you can't tolerate any loss.

📊

Usage dashboard

Track tokens in, tokens saved, average ratio and estimated agent-cost saved per API key — all in one place.

Hosted GPU endpoint

Don't want to run a GPU? Use our managed endpoint for zero-setup compression. $0 / token during the limited-time launch.

Self-host in minutes

From Hugging Face to running proxy

The model is fully open and ships on PyPI — no git clone. Install, run paritok up, and point your agent at it. No data leaves your infrastructure.

1
Install
pip install the middleware + CLI. No clone required.
2
Start
paritok up pulls the model, then serves. Leave it running.
3
Point
Set BASE_URL in a second terminal; your agent routes through Paritok.
4
Customize
Optional: paritok init to tweak settings.
1 · install
# The middleware + CLI. No git clone needed — it all ships on PyPI.
# (Install Ollama first from https://ollama.com/download — it's a separate binary.)
pip install "paritok[proxy]"
2 · start (paritok up)
# Pulls the model if missing (~2.5GB, first run), then starts the proxy.
# LEAVE THIS TERMINAL RUNNING — it must stay up for the whole session.
paritok up

# Want full precision (~8GB) instead of q4?
#   paritok up --registry-model paritok/paritok-4b-v1:f16
# Already pulled a variant yourself? 'up' auto-detects and uses it.
3 · point your agent
# In a SEPARATE terminal, point your agent at the proxy, then launch it.
# macOS / Linux:
export ANTHROPIC_BASE_URL=http://127.0.0.1:8080   # Claude Code
export OPENAI_BASE_URL=http://127.0.0.1:8080      # Codex / OpenAI agents

# Windows PowerShell:
#   $env:ANTHROPIC_BASE_URL = "http://127.0.0.1:8080"
4 · customize (optional)
# Optional — only to change settings (backend, ports, thresholds).
# Defaults work with no file; this drops a starter paritok.yaml you can edit.
paritok init

Don't want to run a GPU?

Use our hosted endpoint on the Paritok GPU server — zero setup, faster compression, still just needs an API key. $0 / token, limited-time free.

Use hosted endpoint

Pricing

Free to start. Free to self-host.

Pricing is $0 / token during launch. An API key is still required so your usage — tokens compressed, cost saved — shows up on your dashboard.

Self-host

FreeApache-2.0

Run the open weights on your own GPU. Full control, nothing leaves your infra.

  • Open LoRA adapter on Hugging Face
  • Reference proxy server included
  • Runs on a single 8GB GPU
  • Community support on GitHub

Hosted GPU

$0/ token · limited-time launch

Zero-setup compression on our GPU server. Just create an API key and point your agent at it.

  • Managed, always-on endpoint
  • Faster compression than a laptop GPU
  • Usage dashboard: tokens & cost saved
  • No credit card required

Start your Paritok journey

Get a free API key in seconds, or download the open model and run it yourself today.