Skip to content
Back to skills

Vector Quantization

ASecurity

"Base VectorQuantize and RandomProjectionQuantizer workflows for

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
toolsgoapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill vector-quantization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vector Quantization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vector Quantization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-vector-quantization/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-vector-quantization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vector-quantization
description: "Base VectorQuantize and RandomProjectionQuantizer workflows for
  single-stage codebook quantization, including masks and lens, image and 3D
  feature maps, kmeans/cosine/codebook-dim tuning, top-k/manual EMA behavior,
  gradient tricks, and optional FVQ bridge guidance."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Vector Quantization

Use this sub-skill for the single-stage, codebook-based APIs in `vector_quantize_pytorch`.

## Covers
- `VectorQuantize`
- `RandomProjectionQuantizer`
- `get_output_from_indices`
- `update_ema_indices`
- `topk`
- `mask` and `lens` handling
- `accept_image_fmap` and `accept_3d_fmap`
- `kmeans_init`, `use_cosine_sim`, `codebook_dim`
- stale-code expiration
- orthogonal and codebook-diversity losses
- multi-headed VQ
- `rotation_trick` and `directional_reparam`
- `sync_codebook`
- optional FVQ bridge guidance

## Route elsewhere
- Residual or grouped residual codebooks -> residual-quantizers
- FSQ or FSP -> scalar-quantizers
- LFQ, ResidualLFQ, GroupedResidualLFQ, LatentQuantize, BinaryMapper, EvoLFQ -> lookup-free-and-latent
- SimVQ, ResidualSimVQ, HierarchicalVQ -> sim-and-hierarchical

## Start here
- [API reference](references/api-reference.md)
- [Workflows](references/workflows.md)
- [Troubleshooting](references/troubleshooting.md)
- [Smoke helper](scripts/smoke_vector_quantize.py)

## Fast read
If you only need a safe check, run the smoke helper on CPU. It covers a tiny `VectorQuantize` forward/reconstruction check and a tiny `RandomProjectionQuantizer` round trip.

Files in this skill

  • SKILL.md1.6 KB
  • references/api-reference.md4.8 KB
  • references/troubleshooting.md2.6 KB
  • references/workflows.md3.7 KB
  • scripts/smoke_vector_quantize.py4.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.