1 个仓库
Generates discrete codes via linear projections using frozen codebooks to stabilize neural network training.
Distinct from Code Generation: Unlike software code generation, this refers to the generation of discrete latent codes in a ML model.
Explore 1 awesome GitHub repository matching artificial intelligence & ml · Implicit Quantization Code Generation. Refine with filters or upvote what's useful.
这是一个用于实现向量和标量量化以在神经网络中创建离散潜在表示的 PyTorch 库。它提供了一套模块和工具,用于将连续向量转换为离散代码,支持向量量化变分自编码器 (VQ-VAE) 等架构。 该库具有维护码本健康和效率的专门机制,包括防止码本崩溃的随机向量重初始化,以及加速收敛的 k-means 质心初始化。它支持多种量化策略,如用于更高分辨率的递归残差量化、用于特征子空间划分的多头并行量化,以及用于创建超立方体代码的有限标量量化。 该工具包包含一个可微量化模块,使用直通估计器 (straight-through estimators) 和旋转技巧来实现通过不可微量化步骤的反向传播。其他功能涵盖通过余弦相似度进行角度距离匹配、用于特征转换的正交正则化,以及通过可学习标量码本实现的潜在空间解耦。
Produces discrete codes through linear projections using frozen codebooks to improve convergence and prevent collapse.