Downloads · 30 days
14
26% of all-time downloads
chetanxpatil/noun-collapse
noun-collapse is a feature extraction model from chetanxpatil. Use it when you need embeddings to search or compare text. It is set up for pytorch. The card lists the license as other.
Word embeddings learned with nothing but a collapse dynamical system — no MLP, no attention, no output layer, no pretrained embeddings. The entire model is one 256-d well per word, a start state, and two scalars (pull…
Downloads · 30 days
14
26% of all-time downloads
All-time downloads
54
Public
Repo size
105 MB
Likes
1
Public
Click a slice to open those files.
.pt105 MB · 100%
From the Hugging Face model README
Word embeddings learned with nothing but a collapse dynamical system — no MLP, no attention, no output layer, no pretrained embeddings. The entire model is one 256-d well per word, a start state, and two scalars (pull strength, readout temperature). ~25.6M numbers total; ~99% of them are the well table.
Meaning is read out of the geometry: the same wells that pull a state during encoding are the vectors you look up as embeddings.
Part of Livnium. Honest by design — the number below is reported against real baselines, not a chance floor.
CBOW-style fill-in-the-blank, executed by the collapse engine instead of a net: for every noun occurrence, a state is collapsed through the noun's ±5-word ordered context and must end up pointing at the missing noun (sampled-softmax cross-entropy over nouns). The update law, applied once per context word:
h ← h − strength · (1 − cos(h, W)) · norm(h − W)
Because the context is read as an ordered collapse trajectory (not a bag), word order is physically encoded — unlike CBOW/PPMI.
| model | data | SimLex-999 ρ (nouns) |
|---|---|---|
| this model | 7.5% of Wikipedia, noun-only | 0.362 (662/666 pairs) |
| word2vec / GloVe (published) | full Wikipedia+Gigaword | ~0.37–0.44 |
| PPMI+SVD (reference) | full corpus | ~0.38 |
Within the word2vec/GloVe band on a fraction of the data, with no neural network.
pip install torch huggingface_hub
hf download chetanxpatil/noun-collapse --local-dir noun-collapse
cd noun-collapse
from modeling_noun_collapse import NounCollapse
m = NounCollapse.from_pretrained("noun_collapse_pure.pt")
m.vector("physics") # 256-d unit embedding of a word
m.similarity("cat", "dog") # cosine similarity
m.neighbors("india", k=8) # nearest nouns
m.encode(["a cat sat on the mat"]) # collapse a sentence -> one state vector
Example neighbors:
cat -> tabby dog pet felis mouse stray feline
physics -> chemistry mathematics astronomy quantum mechanics astrophysics
war -> vietnam outbreak world cold ii boer veteran
india -> gujarat pakistan nepal sikkim delhi bombay punjab bengal
noun_collapse_pure.pt — the checkpoint (wells, stoi, noun_ids,
start, strength, temp, config).modeling_noun_collapse.py — standalone loader/encoder (torch only).config.json — architecture metadata.PolyForm Noncommercial 1.0.0 — free for individuals, students, researchers, nonprofits. Commercial use requires a paid license. See the Livnium repo.