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.
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 applicationh,j,k,lor arrow keys: Navigate between tensorsg: Go to top of the tensor listG: Go to bottom of the tensor listCtrl+f/Ctrl+b: Page up/down/: Enter search mode to filter tensors by nameEscape: Exit search modexorEnter: Load and display detailed statistics for the selected tensorCtrl+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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d257d570757247a3d131d3e063b2b425fc10897a81de4951129516a25214d3ae
|
|
| MD5 |
b7ed922b71977943b617070625cc173a
|
|
| BLAKE2b-256 |
5f339962c574d9a2988a5f8166bc9d09c7d86de82d4deb173f97708d947acaad
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a55258a44f94212e98e2db4314ec4e040f5e39897eced20d07734dea8ed4147
|
|
| MD5 |
acffcc0c7e14fb056a755c252a052cc6
|
|
| BLAKE2b-256 |
87b0692f47110738f3ea6c55d189b9628a59141b1ce6126c9203e5de7d19573c
|