Explain mechanistic interpretability in LLM's in a simple way with easy to understand examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| import matplotlib.pyplot as plt | |
| def read_csv(path="sumprod_bench.csv"): | |
| n = [] | |
| zip_s = [] | |
| sumprod_s = [] | |
| speedup = [] | |
| with open(path, newline="") as f: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| import math | |
| import random | |
| import time | |
| from statistics import median | |
| def dot_zip(p, q): | |
| return sum(a * b for a, b in zip(p, q)) | |
| def dot_sumprod(p, q): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| logger = logging.getLogger('MathApp') | |
| def divide_numbers(a, b): | |
| try: | |
| logger.debug(f"Params provided a: {a}, b: {b}") | |
| result = a / b | |
| logger.info(f"Divide of {a}/{b} success => {result}") |