code-search-net/code_search_net
Viewer β’ Updated β’ 4.14M β’ 26.6k β’ 350
Fine-tuned checkpoint of Stanford's Next-Concept Modeling (NCM) architecture, adapted for ultra-fast, local code documentation and technical function summarization.
NCM operates in a non-autoregressive (NAR) latent space through a 9-level hierarchical Vector-Quantized Variational Autoencoder (VQ-VAE).
This model is intended to act as a lightweight, local writing assistant offloading routine documentation tasks from large frontier LLMs (Claude 3.5 Sonnet, GPT-4, Gemini):
Using Python:
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="r2d2aparicio/ncm-code-doc",
local_dir="artifacts/ncm_code_doc"
)
Files downloaded:
generator.pt (~354 MB): NextConceptTransformer weights.tokenizer.pt (~299 MB): Hierarchical VQ-VAE tokenizer weights with code-adapted decoder.To use this model as a tool in Claude Desktop or Antigravity IDE, clone the official MCP server:
git clone https://github.com/artapaher-max/ncm-code-doc.git
cd ncm-code-doc
pip install -e .
And configure mcpServers:
{
"mcpServers": {
"ncm-fast-writer": {
"command": "/path/to/ncm-code-doc/.venv/bin/python",
"args": ["-u", "/path/to/ncm-code-doc/ncm_doc_server.py"],
"env": { "PYTHONUNBUFFERED": "1" }
}
}
}
code_search_net across Python, JavaScript, and Web repositories.This model is fine-tuned from the checkpoint provided by Stanford Hazy Research:
@article{ncm2024,
title={Next-Concept Modeling: Scalable Non-Autoregressive Generation via Hierarchical Latent Space},
author={Hazy Research, Stanford University},
journal={arXiv preprint},
year={2024}
}