git404hub

what is co-lmlm fr?

lil-lab/co-lmlm — explained in plain English

Analysis updated 2026-05-18

3PythonAudience · researcherComplexity · 5/5Setup · hard

tl;dr

Research code for a language model that looks up facts from an external index at generation time instead of memorizing them in its weights.

vibe map

mindmap
  root((Co-LMLM))
    What it does
      Retrieval aware LM
      Fact tag annotation
      Query based lookup
    Tech stack
      Python PyTorch
      uv environment
      Slurm indexing
    Use cases
      Reproduce paper results
      Train retrieval model
      Build fact index
    Audience
      NLP researchers
    Notes
      113GB index download
      Needs Gemini or OpenAI keys

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Reproduce the Co-LMLM paper's pretraining and evaluation pipeline.

VIBE 2

Train a language model that retrieves facts from an external index rather than memorizing them.

VIBE 3

Build a Wikipedia based retrieval index for a fact-annotated training corpus.

VIBE 4

Download the released model and index to generate text with visible fact retrievals.

what's the stack?

PythonPyTorchuvvLLMSlurm

how it stacks up fr

lil-lab/co-lmlm0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultyhardeasyhard
Complexity5/52/55/5
Audienceresearchergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · hard time til it works · 1day+

Requires a Python 3.12 uv environment, hosted LLM API keys, and downloading a roughly 113GB retrieval index.

in plain english

Co-LMLM is the research code behind an academic paper called Continuous-Query Limited Memory Language Models. It covers the full pipeline a research team used to build and test a new kind of language model that looks things up from an outside store of facts instead of memorizing every fact inside its own weights. The core idea is that factual pieces of text in the training data are marked with a special tag showing a question and an answer, and during training the model learns to produce a special internal signal at each marked spot. At the time the model is actually generating text, that signal is used to search an external index and pull back the matching fact, which gets inserted into the output. The repository includes code for annotating training data this way, training the main Co-LMLM model along with two comparison baseline models, building the retrieval index those models search against, and running the evaluation tools used to measure the results in the paper. Setting this up involves installing a Python 3.12 environment using a tool called uv, and running scripts through it with a specific environment variable set so the code can find its own source files. Several stages of the pipeline call out to hosted AI services like Gemini or OpenAI to help with annotation and grading, which requires setting API keys as environment variables. There is a quick start example that downloads a smaller pretrained model along with a roughly 113 gigabyte Wikipedia based index, then shows a short Python snippet generating text and printing out exactly which facts were retrieved from the index and their confidence scores. The project is organized into a data annotation pipeline, model training code for all three variants studied in the paper, index building tools including a version built for cluster job scheduling, and a separate evaluation folder covering things like text quality, factual accuracy, and how efficiently the models run. The full README is longer than what was shown.

prompts (copy fr)

prompt 1
Help me set up the uv environment and download the CoLMLM-360M-FW model and index.
prompt 2
Explain how the FACT tag annotation and continuous query retrieval work together.
prompt 3
Walk me through running the annotation pipeline's Gemini seed step.
prompt 4
Show me how to inspect result.retrieved_entries after generating text.

Frequently asked questions

what is co-lmlm fr?

Research code for a language model that looks up facts from an external index at generation time instead of memorizing them in its weights.

What language is co-lmlm written in?

Mainly Python. The stack also includes Python, PyTorch, uv.

How hard is co-lmlm to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is co-lmlm for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.