Skip to main content

A terminal application to view safetensors files

Project description

SafeView

A terminal application to view safetensors files. SafeView provides a clean, interactive terminal interface for exploring safetensors files and Hugging Face models. safe-view safe-view search

Features

  • Interactive terminal UI for browsing tensors
  • Detailed tensor information including shape, data type, and size
  • Statistical information about tensor values including min, max, mean, standard deviation, quantile analysis (1st, 10th, 25th, 50th/median, 75th, 90th, 99th percentiles), and sparsity percentage - loaded on demand when a tensor is selected
  • Value distribution histogram visualization with toggle between linear and logarithmic scales
  • Support for local safetensors files and Hugging Face model repositories with automatic downloading
  • Real-time search and filtering by tensor name
  • Clean and intuitive Textual-based interface with tabbed view (Details and Histogram)
  • Optimized loading - only metadata is loaded initially, tensor statistics shown when a tensor is selected
  • Progress indicators when loading tensor statistics
  • Data preview snippets for quick inspection
  • File-level information including total size, tensor count, and total parameter count

Installation

From PyPI:

pip install safe-view

Using pip (from local directory):

pip install .

Using uv:

uv pip install .

Development mode:

If you want to run in development mode, you can install in editable mode:

pip install -e .

or with uv:

uv pip install -e .

Usage

After installation, you can run the application directly from the command line:

safe-view /path/to/your/file.safetensors

Or for a Hugging Face model:

safe-view Qwen/Qwen3-0.6B

For help:

safe-view --help

Controls

  • q: Quit the application
  • h, j, k, l or arrow keys: Navigate between tensors
  • g: Go to top of the tensor list
  • G: Go to bottom of the tensor list
  • Ctrl+f / Ctrl+b: Page up/down
  • /: Enter search mode to filter tensors by name
  • Escape: Exit search mode
  • x or Enter: Load and display detailed statistics for the selected tensor
  • Ctrl+l: Toggle histogram between linear and logarithmic scale
  • Click on a tensor in the left panel to view its details and statistics on the right

Requirements

  • Python 3.9+
  • Dependencies listed in pyproject.toml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safe_view-0.4.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safe_view-0.4.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file safe_view-0.4.0.tar.gz.

File metadata

  • Download URL: safe_view-0.4.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for safe_view-0.4.0.tar.gz
Algorithm Hash digest
SHA256 12b358c823d1fcfe93d4491bd4c9059c9bb6d6a20fd39ccdc8435068f770c5e7
MD5 4d60fa8e9e72e07a4810fac6df8a1850
BLAKE2b-256 0081c849b459b38be20214a23ce6b917803af21c59544d02a855ce0a9943f782

See more details on using hashes here.

File details

Details for the file safe_view-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: safe_view-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for safe_view-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd811823376396e1a88cd87b1424854231a541f669f987ef7d09fbd231c5ad2
MD5 b095b36b6fe24f01540a08d8c9ad22cd
BLAKE2b-256 aeb60fa9646ec72a79d386ac257282d6d60e3b73aa46199ef3169db199c12e0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page