TensorLens safetensors, read in place About Glossary

About TensorLens

A tool for looking inside model files on the Hugging Face Hub without downloading them. Paste a model id and it reads the header, maps every tensor by what it does, and shows where the bytes and the precision actually went.

A curious little robot uses a hand-drawn lens to reveal a map of layered tensors inside an opaque model.

What it deliberately does not do

The constraints are the interesting part, and they are not preferences — they are what the tool is.

There is one server-side component beside all this: a small service that renders the link-preview image when someone shares a model page, because social crawlers do not run JavaScript. It reads no more than your browser does, sets no cookie and stores no identifier.

When it refuses to answer

A wrong number that renders is worse than a blank, because it looks authoritative. So the tool declines in several places rather than guess, and each refusal says what it could not determine:

Known limitations

Measured, not guessed. These are the current ones:

How this was made

TypeScript and Vite with no framework, D3 with hand-rolled SVG marks, Web Workers for decoding and statistics, and a static bundle on S3 behind CloudFront — provisioned with CDK. The share-card service is two small Lambdas and a queue, and issue reporting is one more Lambda writing to a DynamoDB table — the whole of the server side, and none of it between you and a model. Everything numerical is checked against something outside itself: the safetensors parser against Hugging Face's own library, the GGUF decoders byte-for-byte against llama.cpp's dequantizers, the quantization arithmetic against MLX.

The link-preview images are the one part that cannot happen in your browser: a social crawler does not run JavaScript, so the picture has to exist before it arrives. When you open a model, the page asks for a card for that exact revision; a queue renders one, and it is cached from then on, so the work happens once per model rather than once per share. It is drawn by the same renderer the page uses — one module, two consumers — so the card cannot disagree with the map it depicts, and it picks its own view the way the page does: bits per weight when a quantization scheme is recognised, storage dtype when there are exactly two and their names carry the point, bytes otherwise.

This project was made possible thanks to efficient development using AI agents from Claude, OpenAI, Kimi, DeepSeek, Z.ai and Grok, as a side-quest. Source code is intended to be made available for download but needs clean up. The majority of the project was built in a few days of wall-clock time, passively.

While AI-slop is a problem, I (Magnus) find it incredibly enabling to quickly try new ideas and iterate an idea from nothing to something real quickly — and already this tool has been incredibly useful in my main-quest of quantizing models. I hope others will find it helpful too.

As for my way of working, I typically divide work among a developer agent, an expert/reviewer agent, and supplemental testing or development agents as needed when work can be parallelized. I let agents review each other's code rather than having a human developer in the loop.

There are many known issues with the website and I continue to iterate on features, design issues and operational issues — but please file a report using the built-in feature if you find something that is wrong. Thanks!

What's new

The moments the tool actually changed, most recent first. Not a commit log — a line appears here when something a visitor would notice became true.

14 August 2026
Per-family and per-layer totals on the anatomy map, so where a model spends its precision is readable without inspecting every cell. IQ4_NL and IQ4_XS decode. A scheme with no decoder yet now names itself and its block layout instead of reporting an error.
13 August 2026
A model extracted from a multimodal parent can be compared against the tower it came from, matched by tensor shape rather than by name.
12 August 2026
Compare mode offers a model's declared parent, and the map shades each cell by the difference between the two rather than by one side's value.
11 August 2026
Issue reporting, from a button beside the map.
10 August 2026
All ten classic ggml block formats decode, checked byte-for-byte against llama.cpp. bitsandbytes NF4 too.
9 August 2026
GGUF support — inventory, naming, and a picker for repos that ship one model at many precisions. Repos holding several models, and link previews that render the model's own anatomy map.
8 August 2026
AWQ, GPTQ, MXFP4 and packed-int quantizations named and counted correctly, with an honest line for the bytes still unaccounted for. Naming coverage measured across the Hub's most-downloaded models rather than assumed.
7 August 2026
First public version: the tensor inventory, the anatomy map, weight distributions, the what-if precision simulator, compare mode, shareable deep links and the glossary.

FAQ

The short answers. Most of them are expanded on above.

Does anything I open get sent anywhere?
One thing, and it is worth naming. Your browser reads the Hub directly and no tensor data, statistic or tensor name ever reaches us. But when you open a model, the page sends the model id and revision to our own endpoint so a share-card image can be rendered for that address — both values are already in your address bar. No cookie, no identifier, nothing about you. Beyond that, the only record is the CDN's access log of requested paths.
Do I need a Hugging Face token?
No, and there is nowhere to enter one. Public repositories only. Gated and private repos are not supported.
How much does it download?
For the inventory and the map, just the header — a few hundred kilobytes, whether the model is 200 MB or 200 GB. Weights are fetched only for a tensor you click, and only the ranges needed for the sample.
Why is there no distribution for some tensors?
Its quantization scheme has no decoder here yet — several GGUF i-quant formats are still missing. The pane says which scheme it is. Shape, role and byte count are exact regardless.
Are the numbers estimates?
Sizes, shapes and byte ledgers are read from the file and are exact. Bits per weight is derived from those. Distribution statistics come from a sampled read on large tensors, and the pane says when it sampled.
Will it be open source?
That is the intention — the source needs a clean-up pass first. No date promised.
What was used to build it?
AI agents from Claude, OpenAI, Kimi, DeepSeek, Z.ai and Grok, with a developer agent and a reviewer agent reviewing each other rather than a human in the loop. See How this was made.
What is the stack?
TypeScript and Vite, no framework. D3 with hand-rolled SVG, Web Workers for decode and statistics, S3 and CloudFront via CDK. The share-card renderer is two small Lambdas behind a queue, and issue reporting is one more Lambda writing to a DynamoDB table. That is the entire server side — none of it sits on the path between you and a model.
Is this an official Hugging Face tool?
No. It is an independent side project that reads the Hub's public API, built by Magnus at Precisit AB.
Something looks wrong. What do I do?
Use the Report issue button beside the map. It carries the model, revision and tensor, so it can be reproduced exactly.

Acknowledgements

Hugging Face, for a Hub that serves byte ranges over plain HTTP with CORS — the single fact this entire tool rests on — and for the safetensors format, whose self-describing header is why a complete inventory is nearly free.

MLX, whose affine quantization this tool learned to read first and still reads most carefully — every bit-extraction path here was verified against MLX's own, down to the group-size and bit-width combinations the shapes alone cannot distinguish. It is also the format most of my own quantization work is in, so it gets the closest attention when something looks wrong.

llama.cpp and the ggml project, whose dequantizers are the ground truth every GGUF decoder here is checked against, byte-for-byte.

Unsloth, and everyone who publishes quantizations with their layouts documented — the mixed-precision repos are what made the anatomy map worth building.

And anyone who has filed a report. Reports carry no identity — there is no account, no email and no reply path, which is deliberate. But the dialog gives you a receipt when you submit one. Keep it, and if you would like credit for something you found, send it to @magnusldt on X or on Hugging Face and you can be named here.

Contact

Built by Magnus Lundstedt — @magnusldt on X.

Precisit AB.

Found something wrong? The Report issue button beside any model's anatomy map is the fastest route — it carries the model, the revision and the tensor you were looking at, so the problem can be reproduced exactly.

Open a model on TensorLens, or read the glossary for technical definitions.