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.3.1.tar.gz (8.4 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.3.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: safe_view-0.3.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.5

File hashes

Hashes for safe_view-0.3.1.tar.gz
Algorithm Hash digest
SHA256 d257d570757247a3d131d3e063b2b425fc10897a81de4951129516a25214d3ae
MD5 b7ed922b71977943b617070625cc173a
BLAKE2b-256 5f339962c574d9a2988a5f8166bc9d09c7d86de82d4deb173f97708d947acaad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: safe_view-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.5

File hashes

Hashes for safe_view-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a55258a44f94212e98e2db4314ec4e040f5e39897eced20d07734dea8ed4147
MD5 acffcc0c7e14fb056a755c252a052cc6
BLAKE2b-256 87b0692f47110738f3ea6c55d189b9628a59141b1ce6126c9203e5de7d19573c

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