minicoil-training

Train miniCOIL sparse neural retrieval models with per-word 4D projections.

3|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/JoaquinCampo/Skills --skill minicoil-training
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: minicoil-training
Source: https://github.com/JoaquinCampo/Skills/tree/main/minicoil-training
Command: npx skills add https://github.com/JoaquinCampo/Skills --skill minicoil-training

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive reference for training miniCOIL sparse neural retrieval models, enabling context-aware semantic search within inverted indexes.

Core Features & Use Cases

  • Self-supervised per-word training: trains a tiny per-word linear layer (4D output) using triplet loss to create distinct sense representations.
  • End-to-end training pipeline: from vocabulary construction to per-word training, sparse encoding, and BEIR evaluation, all aligned for deployment with Qdrant.
  • Deployment-ready artifacts: outputs weight and bias for every word (word_layers.pt), enabling direct integration into sparse-vector search backends.

Quick Start

Run a demo by loading the per-word linear layers and encoding sample text into a 4D sparse vector.

Frequently Asked Questions about minicoil-training

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train sparse retrieval models for semantic search in inverted indexes?

To train sparse retrieval models for inverted indexes, this Skill builds a 30,000-word vocabulary and learns per-word 4D projections using triplet loss. It outputs deployment-ready weights that augment inverted indexes with semantic context.

What is miniCOIL sparse neural retrieval and how does it work?

miniCOIL sparse neural retrieval works by training a tiny per-word linear layer that outputs 4D vectors. It uses semi-hard triplet mining to create distinct word sense representations, enhancing inverted index search with semantic awareness.

Do I need 512D input embeddings to train sparse per-word vectors?

Yes, you need 512D input embeddings to train sparse per-word vectors with this workflow. The pipeline takes these 512D inputs and applies TripletMarginLoss optimization to project them down to a 4D output per word.

Can I evaluate sparse retrieval models on BEIR benchmarks?

Yes, you can evaluate sparse retrieval models on BEIR benchmarks. The end-to-end training pipeline includes a BEIR evaluation step to test the performance of your newly trained per-word semantic vectors.

How do I deploy trained sparse vectors with Qdrant for search?

You deploy trained sparse vectors with Qdrant by using the generated weight and bias artifacts, word_layers.pt. These deployment-ready artifacts enable direct integration into your sparse-vector search backend.

What are the limitations of using per-word 4D projections for sparse retrieval?

A limitation of per-word 4D projections for sparse retrieval is that the training workflow is designed for English-only data. It also strictly requires a 30,000-word vocabulary and 512D input embeddings to function correctly.