Skip to main content

Poster-style visualizations of neural network weights.

Project description

owart

Generates posters based on neural network weights.

Pick an MLX-compatible model and this script will iterate over those weights and do the following:

  • Find the global minimum and maximum weight values.
  • Normalize weights to [0, 1].
  • Trim the upper and lower percentiles to reduce outlier impact.
  • Map normalized weights to colors based on intensity.
  • Pack weight matrices into a visually appealing layout.
  • Render the packed layout into a high-resolution image with a legend and metadata.

Requirements

  • Python 3.13+
  • MLX on Apple Silicon (for mlx / mlx-lm)

Dependencies are declared in pyproject.toml.

Usage

Basic:

uvx owart mlx-community/Llama-3.2-1B-Instruct-4bit

Options

  • --packing {polyomino,maxrects,guillotine,shelf}: packing algorithm (default: polyomino).
  • --polyomino-workers N: parallel search workers for polyomino packing (default: CPU count).
  • --palette {tab20,tab20b,tab20c}: color palette (20 colors).
  • --color-method {blackwhite,opacity}: how intensity maps to color.
  • --shrink N / --scale-method {mean,median,max,sample}: image reduction (shrink auto-computed if omitted).
  • --intensity-method {linear,gamma,smoothstep,sigmoid}: intensity curve (default: smoothstep).
  • --intensity-clip-percent P: clamp top/bottom P percentile before normalization (default: 0.05).
  • --frame-padding N: padding around the visualization.
  • --frame-section-gap N: gap between footer sections.
  • --frame-bottom-padding N: space below the legend.
  • --frame-font-size N: base font size for footer/legend.
  • --frame-line-spacing N: line spacing (default: 0.35 * font size).
  • --frame-bg #RRGGBB or R,G,B: frame background color.
  • --inner-border-width N: border width around the central visual.
  • --inner-border-color #RRGGBB or R,G,B: border color.
  • --no-frame: output just the visualization.

Example

uvx owart mlx-community/Llama-3.2-1B-Instruct-4bit \
  --packing polyomino --polyomino-workers 8 \
  --palette tab20 --color-method blackwhite \
  --intensity-method smoothstep --intensity-clip-percent 0.05 \
  --frame-padding 80 --frame-font-size 60 --frame-section-gap 80 \
  --frame-bg "#000000" \
  --inner-border-width 5 --inner-border-color "#FFFFFF"

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

owart-0.1.0.tar.gz (56.8 kB view details)

Uploaded Source

Built Distribution

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

owart-0.1.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file owart-0.1.0.tar.gz.

File metadata

  • Download URL: owart-0.1.0.tar.gz
  • Upload date:
  • Size: 56.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for owart-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3faa850923fa009a30359adba0bea7c326ecdcd3c9d5dcbd275b6e9a8d7ed2a8
MD5 be02512817e921b219c23c9e9c9159fe
BLAKE2b-256 bb0a7ee07735650f7dd3bb2c06489d395024297f277a66ce05e2dce7b1f94786

See more details on using hashes here.

File details

Details for the file owart-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: owart-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for owart-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd9cd3ac4c09f65b179abc8680c56bf922084d0a284046a81d1b64da3e95202b
MD5 d1666de5bd9c9a51f0e29475d66a3933
BLAKE2b-256 9c418435d3d5ce9f6597c8d362c8adc76b94713e5675cef616a8592dc07562b6

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