Algorithms to better understand DNN (deep neural networks) weights.
pip install n_bitsAnalyze Llama-3.2 1B:
n-bits analyze --hf-repo meta-llama/Llama-3.2-1Bimport huggingface_hub
import safetensors
from n_bits.analyze import graph_histogram
# Load a tensor
local_path = huggingface_hub.hf_hub_download(repo_id="meta-llama/Llama-3.2-1B", filename="model.safetensors")
tensors = safetensors.torch.load_file(local_path)
first_name = next(iter(tensors))
first = tensors[first_name]
graph_histogram(first, first_name)