Browse Memories
View and manage all stored memories in your knowledge base
Showing 1-10 of 2845 memories
Page 1 of 285
"""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...
"""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...
"""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...
"""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...
"""Tests for ArchitectureAdapter._qkvo_weight_conversions() factory method.""" import torch from transformer_lens.model_bridge.architecture_adapter import ArchitectureAdapter class _FakeCfg: d...
"""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...
"""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,...
"""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...
"""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...
"""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...