Browse Memories

View and manage all stored memories in your knowledge base

Showing 1-10 of 2845 memories

Page 1 of 285

proceduralJul 30

"""Tests for the get_params_util module.""" from unittest.mock import Mock import pytest import torch from transformer_lens.model_bridge.get_params_util import get_bridge_params class TestGetBrid...

abcfc0ef...View details
proceduralJul 30

"""Tests for `benchmark_gated_hooks_fire`. The benchmark's job: exercise every cfg-gated attention hook on every verified architecture and fail if the hook was registered but never fired. This replac...

bfeb0495...View details
proceduralJul 30

"""Tests for ``build_bridge_from_module`` free function. Signature, defaults, and behavior must stay aligned with dev-4.x so that the v4 merge is a no-op for users importing from this module. """ fro...

ec6e95a9...View details
proceduralJul 30

"""Regression test: every adapter's hook aliases resolve to a real HookPoint. Catches bugs where an alias target path doesn't navigate to a HookPoint (the complementary case to Tier 2, which catches...

12287bdb...View details
proceduralJul 30

"""Tests for ArchitectureAdapter._qkvo_weight_conversions() factory method.""" import torch from transformer_lens.model_bridge.architecture_adapter import ArchitectureAdapter class _FakeCfg: d...

a72984f9...View details
proceduralJul 30

"""Unit tests for Bridge.generate() KV cache safety and correctness. Tests cover: - try/finally cleanup of _capture_hf_cache on exception - Encoder-decoder rejection of use_past_kv_cache - _last_hf_c...

54251f29...View details
proceduralJul 30

"""Tests for component setup utilities.""" from types import SimpleNamespace import pytest import torch import torch.nn as nn from tests.mocks.architecture_adapter import MockArchitectureAdapter,...

3a02837a...View details
proceduralJul 30

"""Tests for TransformerBridge.generate() and generate_stream() when no tokenizer is set. Bridge counterpart to tests/unit/test_generate_no_tokenizer.py — regression coverage for https://github.com/T...

23894bc3...View details
proceduralJul 30

"""Unit tests for bridge component access and properties. Tests that TransformerBridge exposes components correctly through its own API, not just through the underlying HuggingFace model. Uses distil...

7e424d2d...View details
proceduralJul 30

"""Tests for get_params_util helper functions.""" import torch from transformer_lens.model_bridge.get_params_util import ( _get_n_kv_heads, _get_or_create_bias, _reshape_kv_weight, ) cl...

9f728ed3...View details