{"repo":"krnel-ai/krnel-graph","free":true,"listed":false,"github":"https://github.com/krnel-ai/krnel-graph","clone":"git clone https://github.com/krnel-ai/krnel-graph.git","description":"Lightweight representation engineering dataflow operations for agent developers.","language":"Python","stars":23,"topics":["dataflow","duckdb","huggingface","huggingface-transformers","lancedb","mechanistic-interpretability","parquet","pylance","pytorch","transformerlens"],"license":"Apache-2.0","category":"machine-learning","readme_excerpt":"Krnel-graph Blog • Docs • Examples • Github • PyPI A Python toolbox for mechanistic interpretability research built on a lightweight strongly-typed computation graph spec. - Run language models using HuggingFace Transformers, TransformerLens, Ollama, etc., and save activations from the residual stream - Train linear probes from cached activations and evaluate their results - Fetch logit scores for guardrail models - Load and prepare datasets Applications - Build better guardrails using linear probes that understand model internals - Explore large datasets grouped by semantic similarity - Vizualize high-dimensional embeddings with built-in UMAP scatterplots - Evaluate derivative experiments quickly with full caching and provenance tracking of results. - Infrastructure-agnostic : Run in a notebook, on your GPU machine's CLI, or via the task orchestration framework of your choice! Quick start Krnel-graph works on the following platforms: - MacOS (arm64, MPS, Apple M1 or better) - Linux (amd64, CUDA) - Windows native (amd64, CUDA) - Windows WSL2 (amd64, CUDA) Install from PyPI with uv: Make main.py with the following definitions: Then, inspect the results in a notebook: Or use the (completely optional) krnel-graph CLI to materialize a selection of operations and/or monitor progress:","default_branch":null,"files":null,"tree":[],"storefront":"/r/krnel-ai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/krnel-ai/krnel-graph/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}