Downloads · 30 days
171
16% of all-time downloads
AnanyaPathak/esmc-300m-gguf
esmc-300m-gguf is a feature extraction model from AnanyaPathak. Use it when you need embeddings to search or compare text. It is set up for gguf. The card lists the license as other.
GGUF conversions of ESM Cambrian (ESM-C) 300M, an encoder-only protein language model, for fast, low-memory per-residue and per-sequence embeddings on CPU and Apple Metal — with no Python or PyTorch needed at inferenc…
Downloads · 30 days
171
16% of all-time downloads
All-time downloads
1.1K
Public
Repo size
5.7 GB
Likes
2
Public
Click a slice to open those files.
.gguf2.8 GB · 100%
From the Hugging Face model README
GGUF conversions of ESM Cambrian (ESM-C) 300M, an encoder-only protein language model, for fast, low-memory per-residue and per-sequence embeddings on CPU and Apple Metal — with no Python or PyTorch needed at inference time.
esmc.cpp (C/C++ on ggml / llama.cpp)[!IMPORTANT] These files use a custom GGUF architecture (
general.architecture = "esmc") and are not loadable by stockllama.cpp/llama-cli. Use theesmc.cppruntime (theesmc-embedtool) shown below.
| File | Size (MiB) | sha256 (first 16) | When to use |
|---|---|---|---|
| esmc-300m-Q4_K_M.gguf | 237.6 | 4a91afbef02a4942 | Smallest with good quality; best 4-bit choice. |
| esmc-300m-Q4_K_S.gguf | 228.2 | 250dd3e6f01087eb | Smallest footprint; lowest peak RAM. |
| esmc-300m-Q8_0.gguf | 337.0 | 3cf9e0797a53ccab | Recommended default — near-F16 quality at ~half the size. |
| esmc-300m-f16.gguf | 633.6 | 403ade8ea1d94f7c | Highest fidelity; numerical reference. |
| esmc-300m-f32.gguf | 1266.6 | dc3dcdbc328722c4 | Full precision; mainly the quantization source (largest). |
| esmc-300m-ft-f16.gguf | 633.6 | e87b42f1a6344e57 |
If unsure, start with esmc-300m-Q8_0.gguf (near-identical to PyTorch at ~half the size). Use Q4_K_M for the smallest deployment with good quality, or F16 when you want the closest possible match to the reference.
git clone --recursive https://github.com/AnanyaP-WDW/esmc.cpp
cd esmc.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j8
pip install -U huggingface_hub
huggingface-cli download AnanyaPathak/esmc-300m-gguf esmc-300m-Q8_0.gguf --local-dir ./models
# Mean-pooled sequence embedding -> one vector per sequence ([n_embd])
./build/esmc-embed -m ./models/esmc-300m-Q8_0.gguf \
-s "MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGY" \
--pool mean --output embedding.npy
# Per-residue embeddings -> matrix ([n_tokens, n_embd])
./build/esmc-embed -m ./models/esmc-300m-Q8_0.gguf \
-s "MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGY" \
--pool none --output residues.npy
# Force CPU (skip the Metal/GPU backend)
./build/esmc-embed -m ./models/esmc-300m-Q8_0.gguf -s "..." --pool mean --no-metal
Outputs are NumPy .npy arrays. Mean pooling strips the <cls>/<eos> tokens.
import numpy as np
emb = np.load("embedding.npy") # mean pool: shape (960,)
res = np.load("residues.npy") # per-residue: shape (n_tokens, 960)
print(emb.shape, res.shape)
Measured on an Apple M4 Max (36 GB) against the official PyTorch ESM-C 300M. Full methodology and per-sequence data are in the esmc.cpp repository.
| Precision | Aggregate mean cosine | Worst min cosine | Max mean-pool L2 | Pass rate |
|---|---|---|---|---|
| F16 | 1.00000 | 1.0000 | 0.0012 | 100/100 |
| Q8_0 | 0.99987 | 0.9964 | 0.0194 | 100/100 |
| Q4_K_M | 0.99534 | 0.9374 | 0.0792 | 100/100 |
| Q4_K_S | 0.99422 | 0.9352 | 0.0900 | 100/100 |
F16 and Q8_0 clear per-sequence mean cosine > 0.999; Q4_K_M / Q4_K_S clear the per-sequence > 0.99 gate (aggregate ~0.994-0.995 after the FFN LayerNorm bias fix).
| Bucket | Tokens | Best esmc.cpp | seq/s |
|---|---|---|---|
| short | 47 | metal/f16 | 95.70 |
| medium | 235 | metal/f16 | 38.33 |
| long | 850 | metal/f16 | 9.51 |
pytorch/pytorch_mps/f32 at 304 MiB (long sequences).esmc.cpp/cpu/f32 at 2614 MiB.| Precision | Assays | Mean abs Spearman delta | Max abs Spearman delta | Metric rows pass |
|---|---|---|---|---|
| F16 | 10 | 0.0007 | 0.0029 | 46/50 |
| Q8_0 | 10 | 0.0027 | 0.0059 | 41/50 |
| Q4_K_M | 10 | 0.0143 | 0.0372 | 26/50 |
| Q4_K_S | 10 | 0.0141 | 0.0346 | 21/50 |
Variants are scored by the cosine between mean-pooled mutant and wild-type embeddings; deltas are versus the PyTorch reference (preservation probe).
<cls> prepended and <eos> appended (direct character lookup, no subword splitting).shasum -a 256 models/*.gguf # compare against the sha256 column above
The full replication guide (convert, quantize, validate, benchmark) is in the esmc.cpp README. The lab manual documents every experiment (EXP-001 through EXP-022) with commands, raw results, and run logs.
Built with ESM.
These GGUF files are Derivative Works of the ESM-C 300M Open Model and are distributed under the EvolutionaryScale Cambrian Open License Agreement (the permissive license that governs ESM-C 300M), subject to the Acceptable Use Policy. The ESMC 300M Model is licensed under the EvolutionaryScale Cambrian Open License Agreement.
If you use these models, please cite the esmc.cpp runtime. If you use esmc.cpp or the GGUF model files in your work, please cite the esmc.cpp paper:
@article{pathak2026esmc,
title={esmc.cpp: A Zero-Dependency, Metal-Accelerated C/C++ Runtime for ESM Cambrian Protein Embeddings},
author={Pathak, Anagh and Pathak, Ananya},
journal={OpenReview},
year={2026},
url={https://openreview.net/forum?id=0GarVDrEAi},
note={CAISc 2026, Track 2: Open-Ended Problems, non-archival submission}
}
You may also acknowledge the ESM Cambrian work by EvolutionaryScale and link the esmc.cpp runtime.