界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

vector-quantization

vector-quantization

【开发与工程】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.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

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

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.

我的收藏