{"slug": "pin-v2-choosing-a-model-s-size-and-speed-before-you-train-it", "title": "PIN v2. Choosing a model's size and speed before you train it", "summary": "A new neural network compression method called PIN v2, developed by an unnamed research team, allows model size and speed to be chosen in advance by tying groups of cells to hold identical values, keeping the grid size constant while reducing storage costs. In tests, a network limited to 3,000 numbers with tying achieved 41% accuracy versus 17% for a conventional network, and at 128× compression it landed within 1.2 points of the uncompressed model. The method also enables model prediction, where a linear map can emit models for unseen tasks, matching trained accuracy (0.881 vs 0.876) and outperforming the base model (0.839).", "body_md": "PIN Architecture v2: making a model’s size and speed things you choose in advance.\n\nThe basic trick\n\nNeural network layers are big grids of numbers. The usual way to make one smaller is to shrink the grid.\n\nThis does something else. It keeps the grid the same size but forces groups of cells to hold identical values. Store 2,000 numbers, scatter them across a million cells according to a fixed pattern, and you have a million-weight layer that costs 2,000 numbers to store. The pattern itself is free, since it’s generated from a seed rather than stored.\n\nWeights lose precision, obviously. What you get back is more interesting than it first looks.\n\nWhy it helps\n\nIf you have a tiny storage budget and shrink the grid instead, you get a tiny network. In one of our tests, a conventional network limited to 3,000 numbers could afford exactly one hidden unit. It scored 17%.\n\nTying lets you keep 256 units on the same budget. That scored 41%.\n\nThat’s the whole mechanism, and it took us two wrong explanations to state it properly: tying decouples how wide a network is from how much it costs to store. Normally those are the same choice. Here they aren’t.\n\nTested against magnitude pruning, low-rank factorisation, quantisation and distillation at matched bit budgets, with sparse formats charged for their index overhead (which comparisons usually skip), tying wins four of five budgets. At 128× compression it lands within 1.2 points of the uncompressed model. Below about 100 KB it’s the only one of the five that can be built at all.\n\nThe part we didn’t expect\n\nTwo networks trained separately on the same data are, internally, unrelated. Weight #4,096 in one has nothing to do with weight #4,096 in the other. You can’t average them, compare them, or predict one from the other. They’re islands.\n\nBut if every network uses the same tying pattern, then “value #37” means the same thing in all of them. They share a coordinate system by construction.\n\nOnce models are in a shared coordinate system, you can do arithmetic on them.\n\nSo we tried predicting a model instead of training one\n\nTrain a base network. Fine-tune 45 variants, each on a different subset of classes. Each variant is now just a few thousand numbers, all in the same frame. Fit a simple linear map from “which classes does this task involve” to “how do the numbers change”.\n\nThen hand it a task combination it has never seen and ask for the numbers.\n\nwhere the model came from\n\naccuracy\n\ntrained properly for the task\n\n0.876\n\nemitted from a 10-bit description, never trained\n\n0.881\n\nthe base, unadapted\n\n0.839\n\ngiven the wrong description\n\n0.696\n\nIt matches training. It collapses when misinformed, so it’s genuinely reading the description. And the map plus the base, 43,000 numbers in total, can emit any of 120 possible tasks, where storing those models conventionally would cost 14 million.\n\nWhat it does and doesn’t do\n\nIt recombines. We tested this by withholding one class from ever varying during fitting, which makes its contribution mathematically unrecoverable, and performance on tasks needing it drops by three quarters. It works inside the span of what it has seen and degrades outside it. That’s a real boundary, and we measured it rather than assuming it.\n\nHonest scope\n\nExperiments run up to 3,072-dimensional inputs and width 1,024, covering MLPs, a small vision transformer, and a CNN. Not deployment scale. The compute advantage of the fast-transform variant is real at width 4,096 (44× measured) and negative below width 512, which we report because our own earlier estimate had the sign wrong.\n\nThe core weight-sharing operator coincides with HashedNets (Chen et al., ICML 2015) and priority is theirs. What’s new here: harder baselines, bit-accurate accounting, the input-dimension scaling law, and the model-prediction result.\n\nTwo mechanisms we proposed were refuted by our own subsequent tests. Both corrections are in the paper, along with the failures that produced them.\n\nWhy bother\n\nRight now you train a model and then find out how big and how fast it is. This makes both of them things you specify first. Pick a storage budget, pick an inference bound, pick a family of tasks, and the models follow. That’s a different relationship to model building than tuning until something fits.\n\nPaper, code, per-seed results and the operator checks are all in the record.", "url": "https://wpnews.pro/news/pin-v2-choosing-a-model-s-size-and-speed-before-you-train-it", "canonical_source": "https://discuss.huggingface.co/t/pin-v2-choosing-a-models-size-and-speed-before-you-train-it/178345#post_1", "published_at": "2026-07-31 13:32:01+00:00", "updated_at": "2026-07-31 13:36:13.288668+00:00", "lang": "en", "topics": ["machine-learning", "neural-networks", "ai-research"], "entities": ["PIN v2", "HashedNets", "Chen et al."], "alternates": {"html": "https://wpnews.pro/news/pin-v2-choosing-a-model-s-size-and-speed-before-you-train-it", "markdown": "https://wpnews.pro/news/pin-v2-choosing-a-model-s-size-and-speed-before-you-train-it.md", "text": "https://wpnews.pro/news/pin-v2-choosing-a-model-s-size-and-speed-before-you-train-it.txt", "jsonld": "https://wpnews.pro/news/pin-v2-choosing-a-model-s-size-and-speed-before-you-train-it.jsonld"}}