MCPcopy Index your code

hub / github.com/google-deepmind/penzai / functions

Functions1,092 in github.com/google-deepmind/penzai

↓ 1 callersFunctioninline_groups
Inlines sequential nodes into their parents if possible. This function finds nodes that match ``child_filter`` within nodes that match ``parent_f
penzai/nn/grouping.py:267
↓ 1 callersFunctioninline_groups
Inlines sequential nodes into their parents if possible. This function finds nodes that match ``child_filter`` within nodes that match ``parent_f
penzai/deprecated/v1/nn/grouping.py:263
↓ 1 callersMethodinput_structure
(self)
penzai/deprecated/v1/nn/standardization.py:62
↓ 1 callersMethodinput_structure
(self)
penzai/deprecated/v1/nn/standardization.py:158
↓ 1 callersMethodinput_structure
(self)
penzai/deprecated/v1/nn/dropout.py:67
↓ 1 callersMethodinput_structure
(self)
penzai/deprecated/v1/nn/basic_ops.py:44
↓ 1 callersMethodinput_structure
(self)
penzai/deprecated/v1/nn/basic_ops.py:75
↓ 1 callersMethodinput_structure
(self)
penzai/deprecated/v1/nn/embeddings.py:332
↓ 1 callersMethodinput_structure
(self)
penzai/deprecated/v1/nn/linear_and_affine.py:800
↓ 1 callersMethodinsert_after
Inserts copies of ``value`` after each selected node. Args: value: Value to insert after each selected node. and_select: If True, sel
penzai/core/selectors.py:1234
↓ 1 callersMethodinsert_before
Inserts copies of ``value`` before each selected node. Args: value: Value to insert before each selected node. and_select: If True, s
penzai/core/selectors.py:1258
↓ 1 callersFunctionis_namedarray
Returns True if this is a `NamedArray` or `NamedArrayView`.
penzai/core/named_axes.py:1790
↓ 1 callersFunctionis_pytree_dataclass_type
Checks if a class was wrapped in the `pytree_dataclass` decorator. Note that inheriting from a PyTree dataclass type does NOT produce another PyT
penzai/core/struct.py:49
↓ 1 callersMethodkey_for_field
Generates a JAX PyTree key for a given field name. This can be overridden if more control over JAX key paths is needed. Args: field_na
penzai/core/struct.py:570
↓ 1 callersFunctionname_to_key
(name: str)
penzai/deprecated/v1/nn/parameters.py:652
↓ 1 callersMethodnext_key
Returns a new random key.
penzai/deprecated/v1/data_effects/random.py:37
↓ 1 callersFunctionorder_like
Orders a tree of named arrays to match the structure of another tree. This function takes two PyTrees and makes each NamedArray in ``value_tree``
penzai/core/named_axes.py:1999
↓ 1 callersMethodpath_matrix
Builds a matrix that maps "from" indices to their "to" indices.
penzai/toolshed/model_rewiring.py:161
↓ 1 callersMethodpath_matrix
Builds a matrix that maps "from" indices to their "to" indices.
penzai/deprecated/v1/toolshed/model_rewiring.py:159
↓ 1 callersFunctionprefill
Prefills the key-value caches based on a prompt. Args: model: The converted model we are running inference with. initial_cache_state: The i
penzai/deprecated/v1/example_models/gemma/simple_decoding_loop.py:55
↓ 1 callersFunctionpytree_dataclass
Decorator for constructing a frozen PyTree dataclass. This decorator: - transforms the provided class into a frozen dataclass, - registers
penzai/core/struct.py:73
↓ 1 callersFunctionrecursive_vectorize_step
(current_views, remaining_names)
penzai/core/named_axes.py:247
↓ 1 callersMethodrefine
Refines a selection by selecting within each selected subtree. Although selectors can already be refined by making additional calls, chained
penzai/core/selectors.py:476
↓ 1 callersMethodremove_from_parent
Removes selected nodes from their parent sequence (a list or tuple). This is a convenience wrapper for ``.apply_and_inline(lambda x: ())``.
penzai/core/selectors.py:1220
↓ 1 callersFunctionrender_selection_to_foldable_representation
Renders a top-level selection object to its foldable representation. This function produces a rendering of either the selection itself, or its se
penzai/core/_treescope_handlers/selection_rendering.py:135
↓ 1 callersFunctionrender_struct_constructor
Renders the constructor of a Struct, with an open parenthesis.
penzai/core/_treescope_handlers/struct_handler.py:29
↓ 1 callersMethodselect_and_set_by_path
Selects subtrees and replaces them based on relative keypaths. Convenience method that combines `at_keypaths` and `set_by_path`. Args:
penzai/core/selectors.py:384
↓ 1 callersMethodset_value
Sets the value of the Variable.
penzai/core/variables.py:521
↓ 1 callersMethodsome_instance_method
(self)
tests/core/struct_pytree_dataclass_test.py:201
↓ 1 callersFunctionstruct_attr_style_fn_for_fields
Builds a function to render attributes of a struct. The resulting function will render pytree node fields in a different style. Args: fields
penzai/core/_treescope_handlers/struct_handler.py:72
↓ 1 callersFunctiontree_flatten_exactly_one_level
Flattens a PyTree exactly one level, or returns None if it's not a PyTree. Args: tree: Tree to flatten. Returns: If ``tree`` has any chi
penzai/core/tree_util.py:37
↓ 1 callersMethodtree_unflatten
Unflattens this tree node. See `jax.tree_util.register_pytree_with_keys_class`. This method should not be overridden by subclasses, since
penzai/core/struct.py:645
↓ 1 callersMethodtreescope_color
Returns a color for this variable in Treescope.
penzai/core/variables.py:535
↓ 1 callersMethodtreescope_color
(self)
penzai/nn/grouping.py:231
↓ 1 callersMethodtreescope_color
(self)
penzai/deprecated/v1/nn/grouping.py:227
↓ 1 callersMethodunfreeze_as_copy
Returns a new mutable copy of this variable.
penzai/core/variables.py:139
↓ 1 callersMethoduntag
(self, *axis_order: AxisName)
penzai/core/named_axes.py:1703
↓ 1 callersMethodupdate
Updates the value of this variable to match a frozen variable.
penzai/core/variables.py:120
↓ 1 callersMethodwith_renamed_parameters
( self, rename_fn: Callable[[str], str] )
penzai/deprecated/v1/nn/parameters.py:177
MethodGetPieceSize
Returns the number of tokens in the vocabulary.
penzai/toolshed/token_visualization.py:38
Method__call__
Creates a new instance of the class. Args: *args: Arguments to __init__. **kwargs: Keyword arguments to __init__. Returns:
penzai/core/struct.py:401
Method__call__
(self, argument: Any, /, **side_inputs)
penzai/toolshed/jit_wrapper.py:56
Method__call__
Calls the intercepted method with the given arguments and kwargs. Args: args_and_kwargs: The positional and keyword arguments passed to the
penzai/toolshed/unflaxify.py:117
Method__call__
Signature for a loss function. Args: model: The structure with parameters, usually a neural network model. state: Arbitrary state man
penzai/toolshed/basic_training.py:42
Method__call__
( self, attn_weights: pz.nx.NamedArray, **_unused_side_inputs )
penzai/toolshed/model_rewiring.py:54
Method__call__
( self, inputs: pz.nx.NamedArray, **_unused_side_inputs )
penzai/toolshed/model_rewiring.py:177
Method__call__
(self, inputs, **side_inputs)
penzai/toolshed/model_rewiring.py:205
Method__call__
( self, tree: PyTreeOfArrays, **_unused_side_inputs )
penzai/toolshed/sharding_util.py:207
Method__call__
( self, tree: PyTreeOfNamedArrays, **_unused_side_inputs )
penzai/toolshed/sharding_util.py:235
Method__call__
(self, argument, /, **side_inputs)
penzai/toolshed/isolate_submodel.py:82
Method__call__
(self, value: Any, /, **_unused_side_inputs)
penzai/toolshed/save_intermediates.py:50
Method__call__
(self, value: Any, /, **_unused_side_inputs)
penzai/toolshed/save_intermediates.py:63
Method__call__
(self, argument: Any, /, **side_inputs)
penzai/toolshed/gradient_checkpointing.py:62
Method__call__
Standardizes a named array across the given axes.
penzai/nn/standardization.py:46
Method__call__
Root-mean-square standardizes a named array across the given axes.
penzai/nn/standardization.py:132
Method__call__
Runs each of the sublayers in sequence. Args: value: The input to the first sublayer. **side_inputs: The side inputs for all sublayer
penzai/nn/grouping.py:65
Method__call__
Runs each of the sublayers in sequence. Args: value: The input to the first sublayer. **side_inputs: The side inputs for all sublayer
penzai/nn/grouping.py:133
Method__call__
Runs each of the sublayers in sequence. Args: value: The input to the layer. **side_inputs: The side inputs for all sublayers. R
penzai/nn/grouping.py:185
Method__call__
Returns the input unchanged.
penzai/nn/grouping.py:227
Method__call__
Checks the structure of the value, then returns it.
penzai/nn/grouping.py:248
Method__call__
Randomly drops out components of the input.
penzai/nn/dropout.py:68
Method__call__
Runs each of the sublayers in order, then adds back the original input. Args: value: The input to the block. **side_inputs: Side inpu
penzai/nn/combinators.py:50
Method__call__
(self, arg, **side_inputs)
penzai/nn/combinators.py:80
Method__call__
(self, arg, **side_inputs)
penzai/nn/combinators.py:111
Method__call__
( self, value: jax.Array | named_axes.NamedArrayBase, **_unused_side_inputs, )
penzai/nn/basic_ops.py:43
Method__call__
( self, inputs: named_axes.NamedArrayBase, **_unused_side_inputs )
penzai/nn/basic_ops.py:67
Method__call__
(self, value: Any, **_unused_side_inputs)
penzai/nn/basic_ops.py:88
Method__call__
(self, value: Any, **_unused_side_inputs)
penzai/nn/basic_ops.py:102
Method__call__
Applies the attention mask to the input array. Args: x: The input array to mask. Usually the matrix of query-key dot products. **side
penzai/nn/attention.py:57
Method__call__
Applies the attention mask to the input array. Args: x: The input array to mask. Usually the matrix of query-key dot products. **side
penzai/nn/attention.py:111
Method__call__
Applies the attention mask to the input array. Args: x: The input array to mask. Usually the matrix of query-key dot products. **side
penzai/nn/attention.py:175
Method__call__
Runs the attention computation. Args: x: The input to the computation, which will be mapped to queries, keys, and values by the sub
penzai/nn/attention.py:229
Method__call__
Runs the caching attention computation and update the K/V cache state. When called, ``self.kv_cache_end_index`` should be filled with a scala
penzai/nn/attention.py:305
Method__call__
Abstract call method for a layer. Layers are model components that take one main input and optional side inputs, and produce a single output.
penzai/nn/layer.py:49
Method__call__
Retrieves tokens from the embedding table. Args: token_index: A named array of token indices. Axis names of this array must be disj
penzai/nn/embeddings.py:142
Method__call__
Retrieves tokens from the embedding table. Args: out_embeddings: The output embeddings that should be mapped to token logits. Shoul
penzai/nn/embeddings.py:179
Method__call__
( self, inputs: named_axes.NamedArray, **side_inputs )
penzai/nn/embeddings.py:252
Method__call__
( self, inputs: named_axes.NamedArray, **side_inputs )
penzai/nn/embeddings.py:308
Method__call__
Signature for a generalized linear operator `NamedArray` initializer. This signature attempts to make explicit all of the dimensions used by an
penzai/nn/linear_and_affine.py:43
Method__call__
(self, value: NamedArray, **_unused_side_inputs)
penzai/nn/linear_and_affine.py:229
Method__call__
Runs the einsum operation.
penzai/nn/linear_and_affine.py:321
Method__call__
Runs the linear operator.
penzai/nn/linear_and_affine.py:424
Method__call__
Adds a learned bias to the value.
penzai/nn/linear_and_affine.py:652
Method__call__
Scales its input by the scaling factor.
penzai/nn/linear_and_affine.py:771
Method__call__
Calls the stacked sublayers under a `jax.lax.scan`.
penzai/nn/layer_stack.py:85
Method__call__
Scores log-probabilities for the given inputs. Args: tokens: Array of token IDs, as an integer named array with a "seq" axis and po
penzai/models/transformer/model_parts.py:126
Method__call__
Processes a new subsequence of tokens and adds them to the K/V cache. When called, the internal variables tracking the key-value cache will be
penzai/models/transformer/sampling_mode.py:80
Method__call__
Scores log-probabilities for the given inputs. Args: inputs: Structure of input arguments, containing tokens, segment positions, an
penzai/deprecated/v1/example_models/gemma/model_core.py:430
Method__call__
Processes a new subsequence of tokens and adds them to the K/V cache. Args: inputs: Structure of input arguments, containing tokens, segmen
penzai/deprecated/v1/example_models/gemma/sampling_mode.py:192
Method__call__
(self, argument: Any)
penzai/deprecated/v1/data_effects/side_output.py:153
Method__call__
(self, intermediate_value)
penzai/deprecated/v1/data_effects/side_output.py:227
Method__call__
( self, argument: tuple[Any, dict[str, Any]] )
penzai/deprecated/v1/data_effects/local_state.py:279
Method__call__
(self, argument: tuple[Any, ...])
penzai/deprecated/v1/data_effects/side_input.py:132
Method__call__
(self, argument: tuple[Any, Any])
penzai/deprecated/v1/data_effects/side_input.py:216
Method__call__
(self, argument: tuple[Any, jax.Array])
penzai/deprecated/v1/data_effects/random.py:123
Method__call__
(self, argument: Any)
penzai/deprecated/v1/data_effects/random.py:196
Method__call__
(self, argument: Any)
penzai/deprecated/v1/data_effects/random.py:290
Method__call__
Abstract call method for a layer. Layers are submodels that take a single input and produce a single output. By convention, almost all model
penzai/deprecated/v1/core/layer.py:110
Method__call__
(self, argument: Any, /)
penzai/deprecated/v1/toolshed/jit_wrapper.py:60
Method__call__
(self, value: Any, /)
penzai/deprecated/v1/toolshed/interleave_intermediates.py:50
← previousnext →201–300 of 1,092, ranked by callers