Skip to content

matanby/sft-cli

Repository files navigation

sft

A fast, interactive terminal browser for .safetensors files.

sft demo

Why?

If you work with ML models, you've probably found yourself wondering "what's actually in this .safetensors file?" — the layer names, shapes, dtypes, sizes. Maybe you want to check if a model has the layers you expect, compare two checkpoints, or just explore an unfamiliar architecture.

sft lets you do that instantly from your terminal. No Python scripts, no notebooks, no waiting for tensors to load into memory. It reads only the file header, so even multi-gigabyte models open in milliseconds.

⚡ Installation

The recommended way to install is via uv:

uv tool install sft-cli

This makes sft available globally as a command.

Or install with pip:

pip install sft-cli

Usage

sft model.safetensors

That's it. Navigate with arrow keys, search with /, quit with q.

✨ Features

  • Hierarchical browser — Tensors grouped by namespace (e.g., model.layers.0.attention)
  • Instant startup — Header-only parsing, works on multi-GB files
  • Search — Filter tensors by name with /
  • Sort — By name, size, or rank with s
  • Inspect — View full tensor details with Space
  • Metadata — See embedded file metadata with m
  • Read-only — Never touches your model files

⌨️ Keybindings

Key Action
/ Navigate
/ Collapse/expand tree
Tab Switch panels
/ Search
s Cycle sort mode
Space Tensor details
m File metadata
f Filter by dtype
q Quit

License

MIT

About

An interactive terminal browser for `.safetensors` files

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages