chanind/linear-relational

Linear Relational Embeddings (LREs) and Linear Relational Concepts (LRCs) for LLMs in PyTorch

43
/ 100
Emerging

This tool helps AI researchers and practitioners understand and manipulate how Large Language Models (LLMs) connect subjects to objects within sentences. It takes a collection of example sentences with a subject, relation, and object (like "Paris is located in France") and produces a 'map' (LRE) that reveals the model's internal representation of that relation. You can then use these maps or 'concepts' (LRCs) to understand or even alter a model's behavior, for example, changing its predicted output for a specific subject-relation pair.

No commits in the last 6 months. Available on PyPI.

Use this if you are a researcher or advanced practitioner working with transformer-based LLMs and want to interpret or directly edit the relational knowledge they encode.

Not ideal if you are looking for a high-level API for everyday LLM fine-tuning or prompt engineering without needing to understand the model's internal activations.

LLM-interpretability causal-editing neural-network-analysis AI-safety model-steering
Stale 6m
Maintenance 0 / 25
Adoption 5 / 25
Maturity 25 / 25
Community 13 / 25

How are scores calculated?

Stars

10

Forks

2

Language

Python

License

MIT

Last pushed

Aug 07, 2024

Commits (30d)

0

Dependencies

3

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/chanind/linear-relational"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.