MCPcopy Index your code

hub / github.com/google-deepmind/penzai / types & classes

Types & classes360 in github.com/google-deepmind/penzai

↓ 88 callersClassCustomLeaf
A leaf type for use in tests.
tests/core/selectors_test.py:32
↓ 74 callersClassSELECTED_PART
(Visually-distinctive) marker class for the selected subtree in tests.
tests/core/selectors_test.py:51
↓ 22 callersClassTaggedStruct
A simple identity layer with a comment tag, for assertions.
tests/nn/grouping_test.py:25
↓ 22 callersClassTaggedStruct
A simple identity layer with a comment tag, for assertions.
tests/deprecated/v1/nn/grouping_test.py:25
↓ 8 callersClassNamedArray
r"""A multidimensional array with a combination of positional and named axes. Conceptually, ``NamedArray``\ s can have positional axes like an ordi
penzai/core/named_axes.py:1338
↓ 8 callersClass_InProgressSelectionBoundary
Helper object for building a selection. Not intended to be exposed to user code! If you're seeing this and you don't expect to, please file an is
penzai/core/selectors.py:127
↓ 6 callersClassHandledRandomRef
Reference for a handled random effect.
penzai/deprecated/v1/data_effects/random.py:68
↓ 5 callersClassCallMockHelper
Helper object to call a function with it's value and a child. Attributes: child: A PyTree child. Can be traversed to handle effects. fn: A
tests/deprecated/v1/nn/parameters_test.py:34
↓ 5 callersClassDimVar
A dimension variable, which will be matched with the shapes in a structure. In a slight abuse of syntax, ``DimVar`` can be unpacked using ``*`` or
penzai/core/shapecheck.py:74
↓ 5 callersClassNamedArrayView
A possibly-transposed view of an array with positional and named axes. This view identifies a particular set of axes in a data array as "virtual
penzai/core/named_axes.py:1544
↓ 5 callersClassTmpPosAxisMarker
A marker object used to temporarily assign names to positional axes. Every ``TmpPosAxisMarker`` is unique, comparing equal only to itself, so it is
penzai/core/named_axes.py:111
↓ 5 callersClass_UnsatisfiedConstraint
A constraint that we have already failed to satisfy.
penzai/core/shapecheck.py:253
↓ 4 callersClassBar
tests/core/selectors_test.py:621
↓ 4 callersClassFoo
tests/core/selectors_test.py:616
↓ 4 callersClassMyLayer
tests/nn/layer_test.py:25
↓ 4 callersClassSelection
A selected subset of nodes within a larger PyTree. Penzai selectors (such as ``.at(...)``) return ``Selection`` objects, which indicate a specifi
penzai/core/selectors.py:164
↓ 3 callersClassBar
tests/core/auto_order_types_test.py:32
↓ 3 callersClassFoo
tests/core/auto_order_types_test.py:27
↓ 3 callersClassHandledLocalStateRef
Marker for a handled local state effect. Attributes: handler_id: The ID of the handler that is responsible for handling this effect.
penzai/deprecated/v1/data_effects/local_state.py:207
↓ 3 callersClassIncrementEverythingLayer
tests/deprecated/v1/data_effects/local_state_test.py:79
↓ 3 callersClassKnownDim
A dimension with a known value, used to bind a name to a value directly. The usual way to create a ``KnownDim`` is by calling `vars_for_axes` with
penzai/core/shapecheck.py:134
↓ 3 callersClassMyEffectfulLayer
tests/deprecated/v1/data_effects/random_test.py:27
↓ 3 callersClassMyEffectfulLayer
tests/deprecated/v1/data_effects/side_input_test.py:28
↓ 3 callersClassMySideOutputWritingLayer
tests/deprecated/v1/data_effects/side_output_test.py:25
↓ 3 callersClassParameter
A learnable parameter. Most initialized layers should use Parameter to store their learnable parameters. Attributes: value: The value of t
penzai/deprecated/v1/nn/parameters.py:159
↓ 3 callersClassPyTreeDataclassSafetyError
Error raised due to pytree dataclass safety checks.
penzai/core/struct.py:65
↓ 3 callersClassRandomEffectImpl
Implementation of the random number generation effect.
penzai/deprecated/v1/data_effects/random.py:77
↓ 3 callersClassSELECTED_LEVEL_3
tests/core/selectors_test.py:1120
↓ 3 callersClassSomeStruct
tests/core/struct_pytree_dataclass_test.py:116
↓ 3 callersClassStructureMismatchError
Raised when a `check_structure` call fails.
penzai/core/shapecheck.py:499
↓ 3 callersClassWeirdModel
tests/toolshed/unflaxify_test.py:88
↓ 3 callersClassWeirdModel
tests/deprecated/v1/toolshed/unflaxify_test.py:90
↓ 3 callersClass_Binding
A binding for a variable set by a keypath.
penzai/core/shapecheck.py:504
↓ 2 callersClassArraySpec
A non-leaf marker for a (named) array structure. This is like a `jax.ShapeDtypeStruct`, but it is an empty PyTree node instead of being a leaf, s
penzai/core/shapecheck.py:265
↓ 2 callersClassAttentionTypeGlobalCausal
Marker for a global attention block.
penzai/models/transformer/variants/llamalike_common.py:45
↓ 2 callersClassAutoNmapModuleWrapper
Wrapper for a module that automatically applies `nmap` to callables. Attributes: _module: The module to wrap.
penzai/toolshed/auto_nmap.py:62
↓ 2 callersClassDisabledDropout
A no-op layer taking the place of a disabled `StochasticDropout` layer. This layer can be used to mark a location in a model where dropout could
penzai/nn/dropout.py:99
↓ 2 callersClassDisabledDropout
A no-op layer taking the place of a disabled `StochasticDropout` layer. This layer can be used to mark a location in a model where dropout could
penzai/deprecated/v1/nn/dropout.py:107
↓ 2 callersClassFrozenLocalStateRequest
Effect request for local state with a frozen value. This can be used to store the state for a stateful model after it has been initialized and po
penzai/deprecated/v1/data_effects/local_state.py:138
↓ 2 callersClassGemmaKVCachingState
Sampling state for the key-value-caching Gemma variant. You should not usually need to construct this on your own. Instead, it will be returned b
penzai/deprecated/v1/example_models/gemma/sampling_mode.py:83
↓ 2 callersClassHandledSideInputRef
Reference for a handled side input effect.
penzai/deprecated/v1/data_effects/side_input.py:68
↓ 2 callersClassInterceptedFlaxScopeData
A frozen representation of data in a particular Flax scope. Flax implements its modules using a "functional core" which is a stateful manager of
penzai/toolshed/unflaxify.py:55
↓ 2 callersClassInterceptedFlaxScopeData
A frozen representation of data in a particular Flax scope. Flax implements its modules using a "functional core" which is a stateful manager of
penzai/deprecated/v1/toolshed/unflaxify.py:55
↓ 2 callersClassInternalTrainerState
Internal state for the trainer. Attributes: step: Current step of training. opt_state: An optimizer state for the learnable parts of `model
penzai/toolshed/basic_training.py:67
↓ 2 callersClassMultiDimVar
A variable standing in for a sequence or dictionary axis names. The usual way to create a ``MultiDimVar`` is by unpacking the `var` function, e.g
penzai/core/shapecheck.py:118
↓ 2 callersClassMyLayer
tests/deprecated/v1/shapecheck_layer_test.py:29
↓ 2 callersClassMySequentialSubclass
tests/nn/grouping_test.py:53
↓ 2 callersClassMySequentialSubclass
tests/deprecated/v1/nn/grouping_test.py:53
↓ 2 callersClassMyTestLayer
tests/nn/layer_stack_test.py:26
↓ 2 callersClassOptedInSubStruct
tests/core/struct_pytree_dataclass_test.py:162
↓ 2 callersClassParameterSlot
A slot for a parameter in a model. A ParameterSlot identifies a place in a model (or other pytree) where a Penzai parameter should be substituted
penzai/core/variables.py:632
↓ 2 callersClassRemainingAxisPlaceholder
Sentinel marker for the remainder of axes.
penzai/core/shapecheck.py:67
↓ 2 callersClassSELECTED_LEVEL_1
tests/core/selectors_test.py:1112
↓ 2 callersClassSamplingState
State that manages the set decoded tokens during sampling. The purpose of this class is to keep the outputs, inputs, and key-value caches of the
penzai/deprecated/v1/example_models/gemma/simple_decoding_loop.py:30
↓ 2 callersClassSelectionBoundaryLayoutMark
A layout mark that can be used to identify selected nodes.
penzai/core/_treescope_handlers/selection_rendering.py:74
↓ 2 callersClassSharedLocalStateRequest
Effect request for local state that is shared. A ``SharedLocalStateRequest`` can be used to share an explicitly-named state variable between mult
penzai/deprecated/v1/data_effects/local_state.py:177
↓ 2 callersClassSideInputEffectImpl
Implementation of the side input effect.
penzai/deprecated/v1/data_effects/side_input.py:79
↓ 2 callersClassSideOutputRequest
Effect request for a side output. Since side outputs do not change the behavior of the model, ``SideOutputRequest`` implements `tell` (but in a w
penzai/deprecated/v1/data_effects/side_output.py:48
↓ 2 callersClassStateVariableSlot
A slot for a parameter in a model. A StateVariableSlot identifies a place in a model (or other pytree) where a Penzai state variable should be su
penzai/core/variables.py:786
↓ 2 callersClassStochasticDropout
Stochastic dropout layer. Dropout layers randomly mask out elements with a probability ``drop_rate``, and then scale the output up by a factor of
penzai/nn/dropout.py:30
↓ 2 callersClassStochasticDropout
Stochastic dropout layer. Dropout layers randomly mask out elements with a probability ``drop_rate``, and then scale the output up by a factor of
penzai/deprecated/v1/nn/dropout.py:32
↓ 2 callersClassStochasticModel
tests/toolshed/unflaxify_test.py:153
↓ 2 callersClassStructStaticMetadata
Container for a struct's static fields. Attributes: child_field_names: Names of all non-static fields in PyTree serialization order.
penzai/core/struct.py:441
↓ 2 callersClassUnboundVariableError
Raised when attempting to access the value of an unbound variable.
penzai/core/variables.py:95
↓ 2 callersClassUnhandledEffectError
Exception raised when a method is called on an unhandled effect.
penzai/deprecated/v1/data_effects/effect_base.py:91
↓ 2 callersClassVariableConflictError
Raised when a Variable label is used by multiple Variables.
penzai/core/variables.py:91
↓ 2 callersClassWeirdDense
tests/toolshed/unflaxify_test.py:51
↓ 2 callersClassWeirdDense
tests/deprecated/v1/toolshed/unflaxify_test.py:52
↓ 2 callersClass_DynamicThunk
penzai/core/named_axes.py:401
↓ 2 callersClass_NamedConstraint
A constraint for matching two named shapes.
penzai/core/shapecheck.py:229
↓ 2 callersClass_PositionalConstraint
A constraint for matching two positional shapes.
penzai/core/shapecheck.py:211
↓ 2 callersClass_SliceThunk
penzai/core/named_axes.py:409
↓ 2 callersClass_StaticThunk
penzai/core/named_axes.py:393
↓ 1 callersClassApplyRoPE
Adjusts input embeddings using rotary position embeddings (RoPE). Rotary position embeddings, proposed by Su et al. (2021), incorporate relative
penzai/nn/embeddings.py:206
↓ 1 callersClassArgsAndKwargs
Representation of the arguments and kwargs of a function call.
penzai/toolshed/unflaxify.py:42
↓ 1 callersClassArgsAndKwargs
Representation of the arguments and kwargs of a function call.
penzai/deprecated/v1/toolshed/unflaxify.py:42
↓ 1 callersClassAttentionTypeSlidingWindowCausal
Marker for a local sliding-window attention block. Attributes: window_size: Size of the sliding window.
penzai/models/transformer/variants/llamalike_common.py:50
↓ 1 callersClassAutoStateVarLabel
A label for a StateVariable that is unique based on Python object ID.
penzai/core/variables.py:659
↓ 1 callersClassCalledWithManyStructures
No-op annotation that indicates values of many different shapes.
penzai/deprecated/v1/toolshed/annotate_shapes.py:52
↓ 1 callersClassCustomInitSubclassManual
tests/core/struct_pytree_dataclass_test.py:313
↓ 1 callersClassCustomInitSubclassOptIn
tests/core/struct_pytree_dataclass_test.py:291
↓ 1 callersClassCustomInitSubclassOptOut
tests/core/struct_pytree_dataclass_test.py:302
↓ 1 callersClassDimensionVariableSubstitution
A substitution for all of the dimension variables in a structure. DimensionVariableSubstitution can be used to inspect and modify the dimension v
penzai/core/shapecheck.py:1073
↓ 1 callersClassFlaxVarLabel
A StateVariable label for a Flax variable.
penzai/toolshed/unflaxify.py:84
↓ 1 callersClassGPTNeoXTransformerConfig
Configuration parameters for a GPT Neo-X transformer. These are held in a single configuration object to simplify argument passing during constru
penzai/models/transformer/variants/gpt_neox.py:42
↓ 1 callersClassGemmaInputs
Input structure for `GemmaTransformer`. Attributes: tokens: Sequence of tokens, as an integer named array with a "seq" axis and possibly
penzai/deprecated/v1/example_models/gemma/model_core.py:360
↓ 1 callersClassGemmaKVCachingInputs
Input structure for the `GemmaKVCachingTransformer`. Attributes: tokens: Subsequence of the current tokens we are processing, as an integer
penzai/deprecated/v1/example_models/gemma/sampling_mode.py:107
↓ 1 callersClassGemmaTransformer
Top-level Gemma transformer decoder, encapsulating all internal effects. This class represents the full Gemma model, and can be loaded from the o
penzai/deprecated/v1/example_models/gemma/model_core.py:409
↓ 1 callersClassGemmaTransformerConfig
Common configuration parameters for the Gemma transformer architecture. These are held in a single configuration object to simplify argument passin
penzai/deprecated/v1/example_models/gemma/model_core.py:82
↓ 1 callersClassHandledSideOutputRef
Marker for a handled local state effect. Attributes: handler_id: The ID of the handler that is responsible for handling this effect.
penzai/deprecated/v1/data_effects/side_output.py:70
↓ 1 callersClassIdentityWithExtraPayload
tests/deprecated/v1/data_effects/local_state_test.py:74
↓ 1 callersClassIdentityWithExtraPayload
tests/deprecated/v1/data_effects/random_test.py:49
↓ 1 callersClassIdentityWithSavedActivations
No-op annotation that holds onto intermediate activations.
penzai/deprecated/v1/toolshed/interleave_intermediates.py:56
↓ 1 callersClassIgnoreBangWarningFilter
docs/conf.py:76
↓ 1 callersClassInterceptedFlaxModuleMethod
A representation of an intercepted Flax module method call. An InterceptedFlaxModule captures the logic that runs when you call a single Flax mod
penzai/toolshed/unflaxify.py:92
↓ 1 callersClassInterceptedFlaxModuleMethod
A representation of an intercepted Flax module method call. An InterceptedFlaxModule captures the logic that runs when you call a single Flax mod
penzai/deprecated/v1/toolshed/unflaxify.py:84
↓ 1 callersClassIsolatedSubmodel
An isolated part of a model, with saved inputs, outputs, and variables. Variable values will also be frozen at the state they had when the model
penzai/toolshed/isolate_submodel.py:35
↓ 1 callersClassIsolatedSubmodel
An isolated part of a submodel, with its saved inputs and outputs. When initially populated by `isolate_submodel`, any states used by the submode
penzai/deprecated/v1/toolshed/isolate_submodel.py:36
↓ 1 callersClassIsolationCapturer
Helper object that captures information while running the submodel.
penzai/toolshed/isolate_submodel.py:76
↓ 1 callersClassIsolationCapturer
Helper object that captures information necessary to isolate the submodel.
penzai/deprecated/v1/toolshed/isolate_submodel.py:57
next →1–100 of 360, ranked by callers