Open files in VS Code and Cursor / Machine learning files

A safetensors viewer for VS Code

Install the free Tensor Viewer and click the .safetensors file. It reads the header first, so even a large file lists every tensor with its dtype and shape right away (a 10.7 GB file opened in under a second in our test). Click a tensor to load its values and see stats, a heatmap and a histogram.

Install in VS CodeMarketplace pageOpen VSX (Cursor, Windsurf, VSCodium)

Free, MIT license. Extension ID zovo.tensor-viewer, version 0.4.0. Needs VS Code 1.90.0 or newer.

A GPT-2 style safetensors file with the wpe.weight positional embedding open. The heatmap shows the sine and cosine wave pattern
A GPT-2 style safetensors file with the wpe.weight positional embedding open. The heatmap shows the sine and cosine wave pattern.

Steps in VS Code

  1. Install Tensor Viewer from the Marketplace, or press Ctrl+P (Cmd+P on macOS) and run ext install zovo.tensor-viewer.
  2. Click a .safetensors file. The table lists every tensor.
  3. Click a tensor to see min, max, mean, std, NaN and Inf counts and a heatmap.
  4. Save one tensor as .npy or CSV if you want to work with it elsewhere.

Steps in Cursor, Windsurf or VSCodium

  1. Open the Extensions view with Ctrl+Shift+X (Cmd+Shift+X on macOS).
  2. Search for zovo.tensor-viewer and click Install. Cursor, Windsurf and VSCodium install from Open VSX, where it is published as zovo/tensor-viewer.
  3. If your editor has no gallery, download the .vsix from the Open VSX page and run "Extensions: Install from VSIX...".
  4. Then use it the same way as in VS Code.

What Tensor Viewer handles

What it does not do

Other options

Install counts and Open VSX status were checked on 8 November 2026. Descriptions in quotes are the extensions' own.

Questions

Is safetensors safe to open?

The format holds only a JSON header and raw numbers, so there is no code to run. For pickle-based .pt files, Tensor Viewer decodes the pickle as data and never runs it.

Can I look at a GGUF model the same way?

Yes. Click the .gguf file to see its metadata and tensor table.

Does it upload anything?

No. It has no network access and no telemetry.

More about Tensor Viewer

Read the Tensor Viewer page for every feature and setting, or the source code on GitHub.

Support this work

If this extension saves you time, you can support the work on GitHub Sponsors. Monthly tiers start at $5, and one-time tiers start at $15. Sponsorship is optional, and the tool works the same without it.