How debayanroy676/surgery-on-llm works
This repository is a notebook experiment that tests how a large perturbation to a Llama query-projection weight affects model behavior. The principal workflow inspects a GGUF, loads it into an editable Transformers model, captures a baseline, applies a weight intervention, and measures resulting activation and prediction changes. A separate A/B stage compares original and modified weights across prompts. The README documents these stages; no notebook source excerpts were provided, so the relationships below rely on that documentation.
Main entry points: LLM-Brain-Surgery.ipynb Editable model
Components 12
Model preparation
- GGUF inspection
LLM-Brain-Surgery.ipynb - Model loading
LLM-Brain-Surgery.ipynb - Baseline capture
LLM-Brain-Surgery.ipynb
Weight intervention
- Editable model
LLM-Brain-Surgery.ipynb - Weight modification
LLM-Brain-Surgery.ipynb
Behavior evaluation
- Activation drift
LLM-Brain-Surgery.ipynb - Logit analysis
LLM-Brain-Surgery.ipynb - Token and entropy
LLM-Brain-Surgery.ipynb - Prompt A/B test
LLM-Brain-Surgery.ipynb - Measured results
LLM-Brain-Surgery.ipynb
Other components
- Researcher
- GGUF weights
Connections 15
- Researcher → GGUF inspection: runs experiment
README.md - GGUF inspection → GGUF weights: inspects tensors
README.md - Model loading → GGUF weights: loads weights
README.md - GGUF inspection → Model loading: informs loading
README.md - Model loading → Baseline capture: captures baseline
README.md - Baseline capture → Editable model: records weights
README.md - Weight modification → Editable model: perturbs weights
README.md - Editable model → Activation drift: measures activations
README.md - Editable model → Logit analysis: measures logits
README.md - Logit analysis → Token and entropy: derives distributions
README.md - Baseline capture → Prompt A/B test: compares original
README.md - Weight modification → Prompt A/B test: compares operated weights
README.md - Prompt A/B test → Measured results: reports predictions
README.md - Activation drift → Measured results: reports drift
README.md - Token and entropy → Measured results: reports confidence
README.md