Back to Registry View Author Profile
Official Verified
Turboquant Optimizer
Skill by akanji-creator
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/akanji-creator/turboquant-optimizerOr
TurboQuant Optimizer
A comprehensive token and memory optimization system for OpenClaw, inspired by Google's TurboQuant research. Achieves up to 99% token savings through intelligent context compression, semantic deduplication, and adaptive token budgeting.
Description
TurboQuant Optimizer applies advanced compression techniques from Google's TurboQuant research to OpenClaw conversations. It operates at three levels:
- Session Level: Intelligent context compression and summarization
- Message Level: Semantic deduplication and content optimization
- Token Level: Adaptive token budgeting and smart truncation
Key Innovations:
- Two-stage compression (primary + residual error correction)
- Semantic similarity clustering (PolarQuant-inspired)
- Zero-overhead quantization (QJL-inspired sign-bit encoding)
- Adaptive token budgets based on task complexity
- Conversation checkpointing with intelligent rollback
Installation
openclaw skills install turboquant-optimizer
Configuration
Add to ~/.openclaw/openclaw.json:
{
"skills": {
"turboquant-optimizer": {
"enabled": true,
"session": {
"maxTokens": 8000,
"compressionThreshold": 0.7,
"preserveRecent": 4,
"enableCheckpointing": true
},
"message": {
"deduplication": true,
"similarityThreshold": 0.85,
"compressToolResults": true
},
"token": {
"adaptiveBudget": true,
"budgetStrategy": "task_complexity",
"reserveTokens": 1000
},
"advanced": {
"twoStageCompression": true,
"polarQuantization": true,
"qjltEncoding": false
}
}
}
}
Usage
Automatic Mode
Once enabled, optimization happens transparently:
// No code changes needed - works automatically
// Monitors all API calls and optimizes context
CLI Commands
# Analyze current optimization performance
openclaw skills run turboquant-optimizer stats
# Optimize a specific session
openclaw skills run turboquant-optimizer optimize --session <id>
# Run benchmarks
openclaw skills run turboquant-optimizer benchmark
# Export optimization report
openclaw skills run turboquant-optimizer report --format markdown
Programmatic API
const { TurboQuantOptimizer } = require('turboquant-optimizer');
const optimizer = new TurboQuantOptimizer({
maxTokens: 8000,
compressionThreshold: 0.7
});
// Optimize messages
const optimized = await optimizer.optimize(messages);
// Get detailed statistics
const stats = optimizer.getDetailedStats();
console.log(`Token efficiency: ${stats.efficiencyScore}/100`);
How It Works
Two-Stage Compression (TurboQuant-Inspired)
Stage 1 - Primary Compression (PolarQuant-style):
- Rotates message vectors to simplify geometry
- Applies high-quality quantization to capture main concepts
- Uses 2-3 bits per token for core information
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-akanji-creator-turboquant-optimizer": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.