alt.freeweights.embed / nomic-embed-code-GGUF
From: nomic-ai <huggingface.co/nomic-ai>Newsgroups: alt.freeweights.embedSubject:

nomic-embed-code-GGUF

Date: 2026-11-14Commit: ff2ddedSigned: 2DC28CC7B26A283B ✓

Sentence similarity model. Gguf weights, 111 GB in all. Published by nomic-ai under Apache-2.0.

embed111GBnomic-embed-code-GGUFggufpermissive
FactsParamsnot statedSize111 GBFormatsggufTasksentence similarityLicenseApache-2.0From sourcepermissive
$ fw get nomic-ai/nomic-embed-code-GGUF
# manifest sha256 b61cdc4620fb… · 111 GB · 17 files
$ fw verify ./nomic-embed-code-GGUF nomic-ai/nomic-embed-code-GGUF
From sourceHosted (signed)nomic-ai/nomic-embed-code-GGUFLast check: 2026-11-14 21:10 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of nomic-embed-code.

Works with

Convert with

Evaluate with

Scan with

Overview

Size
111 GB
Weights
2.84 GB (smallest of 15 GGUF variants)
Parameters
not stated
Formats
gguf
Task
sentence similarity
License
Apache-2.0 (permissive)
Files
17, each with a sha256
Publisher
nomic-ai
Added
2026-11-14
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Base model: nomic-ai/nomic-embed-code

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:10 UTCpassed

Model card

From the publisher at commit ff2dded. Shown as plain text with links; images open at the publisher.

Llama.cpp Quantizations of Nomic Embed Code: A State-of-the-Art Code Retriever#

Blog | Technical Report | AWS SageMaker | Atlas Embedding and Unstructured Data Analytics Platform

Using llama.cpp commit 11683f579 for quantization.

Original model: nomic-embed-code

Usage#

This model can be used with the llama.cpp server and other software that supports llama.cpp embedding models.

Queries embedded with nomic-embed-code must begin with the following prefix:

Represent this query for searching relevant code:

For example, the code below shows how to use the prefix to embed user questions, e.g. in a RAG application.

Start a llama.cpp server:

llama-server -m nomic-embed-code.Q4_0.gguf --embeddings --pooling last

And run this code:

import requests
from textwrap import dedent

def dot(va, vb):
    return sum(a*b for a, b in zip(va, vb))
def embed(texts):
    resp = requests.post('http://localhost:8080/v1/embeddings', json={'input': texts}).json()
    return [d['embedding'] for d in resp['data']]

docs = [
    dedent("""\
    def fn(n):
        if n < 0:
            raise ValueError
        return 1 if n == 0 else n * fn(n - 1)
    """).strip(),
    dedent("""\
    def fn(n):
        print(("Fizz" * (n % 3 == 0) + "Buzz" * (n % 5 == 0)) or n)
    """).strip(),
]
docs_embed = embed(docs)

query = 'Calculate the n-th factorial'
query_embed = embed(['Represent this query for searching relevant code: ' + query])[0]
print(f'query: {query!r}')
for d, e in zip(docs, docs_embed):
    print(f'\nsimilarity {dot(query_embed, e):.2f}:\n{d}')

You should see output similar to this:

query: 'Calculate the n-th factorial'

similarity 0.49:
def fn(n):
    if n < 0:
        raise ValueError
    return 1 if n == 0 else n * fn(n - 1)

similarity 0.32:
def fn(n):
    print(("Fizz" * (n % 3 == 0) + "Buzz" * (n % 5 == 0)) or n)

Download a file (not the whole branch) from below:#

FilenameQuant TypeFile SizeDescription
nomic-embed-code.f32.gguff3226.35GiBFull FP32 weights.
nomic-embed-code.f16.gguff1613.18GiBFull FP16 weights.
nomic-embed-code.bf16.ggufbf1613.18GiBFull BF16 weights.
nomic-embed-code.Q8\_0.ggufQ8\_07.00GiBExtremely high quality, generally unneeded but max available quant.
nomic-embed-code.Q6\_K.ggufQ6\_K5.41GiBVery high quality, near perfect, recommended.
nomic-embed-code.Q5\_K\_M.ggufQ5\_K\_M4.72GiBHigh quality, recommended.
nomic-embed-code.Q5\_K\_S.ggufQ5\_K\_S4.60GiBHigh quality, recommended.
nomic-embed-code.Q4\_1.ggufQ4\_14.22GiBLegacy format, similar performance to Q4\_K\_S but with improved tokens/watt on Apple silicon.
nomic-embed-code.Q4\_K\_M.ggufQ4\_K\_M4.08GiBGood quality, default size for most use cases, recommended.
nomic-embed-code.Q4\_K\_S.ggufQ4\_K\_S3.87GiBSlightly lower quality with more space savings, recommended.
nomic-embed-code.Q4\_0.ggufQ4\_03.84GiBLegacy format, offers online repacking for ARM and AVX CPU inference.
nomic-embed-code.Q3\_K\_L.ggufQ3\_K\_L3.59GiBLower quality but usable, good for low RAM availability.
nomic-embed-code.Q3\_K\_M.ggufQ3\_K\_M3.33GiBLow quality.
nomic-embed-code.Q3\_K\_S.ggufQ3\_K\_S3.03GiBLow quality, not recommended.
nomic-embed-code.Q2\_K.ggufQ2\_K2.64GiBVery low quality but surprisingly usable.

Model Overview#

nomic-embed-code is a state-of-the-art code embedding model that excels at code retrieval tasks:

  • High Performance: Outperforms Voyage Code 3 and OpenAI Embed 3 Large on CodeSearchNet
  • Multilingual Code Support: Trained for multiple programming languages (Python, Java, Ruby, PHP, JavaScript, Go)
  • Advanced Architecture: 7B parameter code embedding model
  • Fully Open-Source: Model weights, training data, and evaluation code released
ModelPythonJavaRubyPHPJavaScriptGo
Nomic Embed Code81.780.581.872.377.193.8
Voyage Code 380.880.584.671.779.293.2
OpenAI Embed 3 Large70.872.975.359.668.187.6
Nomic CodeRankEmbed-137M78.476.979.368.871.492.7
CodeSage Large v2 (1B)74.272.376.765.272.584.6
CodeSage Large (1B)70.870.271.961.369.583.7
Qodo Embed 1 7B59.961.668.448.557.081.4

Model Architecture#

  • Total Parameters: 7B
  • Training Approach: Trained on the CoRNStack dataset with dual-consistency filtering and progressive hard negative mining
  • Supported Languages: Python, Java, Ruby, PHP, JavaScript, and Go
CoRNStack Dataset Curation#

Starting with the deduplicated Stackv2, we create text-code pairs from function docstrings and respective code. We filtered out low-quality pairs where the docstring wasn't English, too short, or that contained URLs, HTML tags, or invalid characters. We additionally kept docstrings with text lengths of 256 tokens or longer to help the model learn long-range dependencies.

Image: image/png

After the initial filtering, we used dual-consistency filtering to remove potentially noisy examples. We embed each docstring and code pair and compute the similarity between each docstring and every code example. We remove pairs from the dataset if the corresponding code example is not found in the top-2 most similar examples for a given docstring.

During training, we employ a novel curriculum-based hard negative mining strategy to ensure the model learns from challenging examples. We use a softmax-based sampling strategy to progressively sample hard negatives with increasing difficulty over time.

Join the Nomic Community#

Citation#

If you find the model, dataset, or training code useful, please cite our work:

@misc{suresh2025cornstackhighqualitycontrastivedata,
      title={CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Reranking},
      author={Tarun Suresh and Revanth Gangi Reddy and Yifei Xu and Zach Nussbaum and Andriy Mulyar and Brandon Duderstadt and Heng Ji},
      year={2025},
      eprint={2412.01007},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2412.01007},
}

Files

17 files · 111 GBWeights 2.84 GB (smallest of 15 GGUF variants). Sizes and sha256 from the signed manifest.
Hide all 17 files with their sha256
FileSizesha256
.gitattributes1.56 KBe08cf896faa882fdfbf869edf3ac5e9cfaa850c0ff3b79cf4a29e394bbe2572a
README.md10.3 KB3f549a1804e33706b400446c45971889b5add90fc68494b65744c753b4de9e1b
nomic-embed-code.Q2_K.gguf2.84 GBafaf7fb764e3bbd850629291a52d3955b3376381a4662544b860d71f1e7338a9
nomic-embed-code.Q3_K_L.gguf3.85 GB848ea553eb9f788c32962ba336435b2ae60f1d449d572760ee42a55ce0141797
nomic-embed-code.Q3_K_M.gguf3.57 GBb9dbe007d13d967ed2135120b4c60350dce9d02af01dec29f6c26409c32f62b5
nomic-embed-code.Q3_K_S.gguf3.26 GB6d1d69385827e3cd28e44fb14cf56e4a4156aed72a38ea2f5dd96bebebb8b527
nomic-embed-code.Q4_0.gguf4.12 GB0999f5a97eb15363c4cad76cfa71c413db96f61e8a32a91166e9f45db30b895e
nomic-embed-code.Q4_1.gguf4.53 GB859e801467a37922e0e5a3157a6498a9d33cb2b0ee08daed42e6988b1d1f14de
nomic-embed-code.Q4_K_M.gguf4.38 GB4354a73ee9ff5d811efe552a515dfd518667ff25fdfc4ee9e10af3f617f96eec
nomic-embed-code.Q4_K_S.gguf4.15 GBbe589a33ae8ad094e634adc05a7d186de41da6052a38b85608dc147b39ffab11
nomic-embed-code.Q5_K_M.gguf5.07 GBf234c58a5be4c5e89f71e3b7131150a568b9618d32a34ebb625e9c0f6e0be9fb
nomic-embed-code.Q5_K_S.gguf4.94 GBa75989528b69c854da8d3a9f2f6011c649dc190b7e7b7d81d1356feb395832fa
nomic-embed-code.Q6_K.gguf5.81 GBb179b7e381cb1c7d00a82f5c26858c94e19916257cbd6146c7e21c9240b3dd86
nomic-embed-code.Q8_0.gguf7.52 GB80bbd617cc55bad52ceb0f7dfad5d2f5b8080c61015cad7063ffc438b6561832
nomic-embed-code.bf16.gguf14.1 GB09340ae55bc36f8d5e8a423084253c6460be99fee91d855d086767f40638abcd
nomic-embed-code.f16.gguf14.1 GB33d214c79b97308e82b84f97ebdbba58bc1d8a841ccaaa9053848a06a091b33e
nomic-embed-code.f32.gguf28.3 GB99694fed45c5fd1badea488f7998bce7fa4c4d7e1e1b9e4f58b3d3e6892040e4
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
ff2ddedde9 pinned now manifest updated, same commit2026-11-14 21:10 UTC17 files · 111 GB
ff2ddedde92026-11-14 21:10 UTC17 files · 111 GB

Use it

$ fw get nomic-ai/nomic-embed-code-GGUF
# manifest sha256 b61cdc4620fb… · 111 GB · 17 files
$ fw verify ./nomic-embed-code-GGUF nomic-ai/nomic-embed-code-GGUF
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/nomic-ai/nomic-embed-code-GGUF.json --dir ./nomic-embed-code-GGUF $ python3 fw.py verify ./nomic-embed-code-GGUF ./nomic-ai__nomic-embed-code-GGUF.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download nomic-ai/nomic-embed-code-GGUF --revision ff2ddedde976ea623178981f18e36af33c0c2a94 --local-dir ./nomic-embed-code-GGUF
llama.cppDownload one GGUF variant (nomic-embed-code.Q2_K, 2.84 GB), then serve it.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download nomic-ai/nomic-embed-code-GGUF --include "nomic-embed-code.Q2_K*" --local-dir ./nomic-embed-code-GGUF $ llama-server -m ./nomic-embed-code-GGUF/nomic-embed-code.Q2_K.gguf
OllamaMake an Ollama model from the downloaded file.
$ printf 'FROM ./nomic-embed-code-GGUF/nomic-embed-code.Q2_K.gguf\n' > Modelfile $ ollama create nomic-embed-code-gguf -f Modelfile

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
3f549a1804e33706b400446c45971889b5add90fc68494b65744c753b4de9e1b
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: nomic-ai <huggingface.co/nomic-ai>Newsgroups: alt.freeweights.embedSubject: nomic-embed-code-GGUFDate: 2026-11-14Commit: ff2ddedSigned: 2DC28CC7B26A283B ✓
Upstream
nomic-ai/nomic-embed-code-GGUF
Pinned commit
ff2ddedde976ea623178981f18e36af33c0c2a94
Manifest
nomic-embed-code-GGUF.json · .minisig
Manifest sha256
b61cdc4620fb72727e573dcd9f23c6733fca2dbf95855873930f5b835da0dd9f
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:10 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/nomic-ai/nomic-embed-code-GGUF.json $ curl -O https://freeweights.allternit.com/manifests/nomic-ai/nomic-embed-code-GGUF.json.minisig $ minisign -Vm nomic-embed-code-GGUF.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

nomic-ai/nomic-embed-code · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download nomic-ai/nomic-embed-code-GGUF
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. nomic-embed-code-GGUF.json. Provenance. Takedown history: none.
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens