MCPcopy Index your code

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

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

Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/core/variables.py:548
Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/core/shapecheck.py:55
Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/core/shapecheck.py:360
Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/nn/layer.py:157
Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/deprecated/v1/data_effects/effect_base.py:392
Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/deprecated/v1/data_effects/effect_base.py:446
Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/deprecated/v1/data_effects/effect_base.py:520
Method__treescope_repr__
(self, path: str | None, subtree_renderer: Any)
penzai/deprecated/v1/core/layer.py:222
Method_apply_1d
Apply RoPE to a one-dimensional JAX array.
penzai/nn/embeddings.py:234
Method_apply_1d
Apply RoPE to a one-dimensional JAX array.
penzai/deprecated/v1/nn/embeddings.py:293
Function_check
(subtree)
penzai/core/selectors.py:1431
Method_check_equal
(subtree)
penzai/core/selectors.py:956
Function_common_prefix
(parts: Sequence[tuple[Any, ...]])
penzai/toolshed/unflaxify.py:243
Function_fix
(val, ref)
penzai/core/named_axes.py:2020
Method_fix_attn_mask
(masker)
penzai/models/transformer/sampling_mode.py:172
Function_flat_stateless_call
( body: pz.nn.Layer, state_var_values, argument, side_inputs )
penzai/toolshed/gradient_checkpointing.py:37
Function_generate_with_sensible_dtype
Constructs a zeros array with a reasonable dtype and a given structure.
penzai/deprecated/v1/toolshed/check_layers_by_tracing.py:48
Method_get_structure
(leaf)
penzai/deprecated/v1/nn/parameters.py:267
Function_go
(eff_request: EffectRequest)
penzai/deprecated/v1/data_effects/effect_base.py:200
Function_hoist_it
(request: InitialLocalStateRequest | FrozenLocalStateRequest)
penzai/deprecated/v1/data_effects/local_state.py:603
Function_hoister
( node: SideInputRequest | HandledSideInputRef | WithConstantSideInputs, )
penzai/deprecated/v1/data_effects/side_input.py:386
Function_hole_for_ref
(ref: HandledLocalStateRef)
penzai/deprecated/v1/data_effects/local_state.py:522
Function_initializer
Zeros initializer for named arrays.
penzai/nn/linear_and_affine.py:182
Function_initializer
Zeros initializer for named arrays.
penzai/deprecated/v1/nn/linear_and_affine.py:187
Method_is_leaf_or_childless
(node)
penzai/core/selectors.py:544
Function_is_untagged_hole
Default predicate that selects only untagged holes.
penzai/deprecated/v1/data_effects/random.py:94
Method_make_impl
(keypath, ref: HandledSideOutputRef)
penzai/deprecated/v1/data_effects/side_output.py:156
Function_make_ref
( keypath, hole: ( InitialLocalStateRequest | FrozenLocalStateRequest
penzai/deprecated/v1/data_effects/local_state.py:406
Method_make_ref
(hole: SideOutputRequest)
penzai/deprecated/v1/data_effects/side_output.py:209
Function_maybe_embed_it
(request: SharedLocalStateRequest)
penzai/deprecated/v1/data_effects/local_state.py:664
Method_process_one
(node, multiple=multiple)
penzai/core/selectors.py:558
Function_renamer
(name)
penzai/deprecated/v1/nn/parameters.py:599
Method_repr_html_
(self)
tests/treescope/renderer_test.py:42
Method_repr_pretty_
Pretty-prints this object for an IPython pretty-printer.
penzai/core/struct.py:698
Function_retag
(leaf)
penzai/core/named_axes.py:2108
Method_rms_standardize
(x)
penzai/nn/standardization.py:137
Method_rms_standardize
(x)
penzai/deprecated/v1/nn/standardization.py:152
Function_stateful_trainer_step
Implementation of the training step for StatefulTrainer.
penzai/toolshed/basic_training.py:83
Function_train_step
( train_state: TrainState, **kwargs )
penzai/deprecated/v1/toolshed/basic_training.py:332
Function_untag
(x)
penzai/core/named_axes.py:2081
Method_unwrap
(l: _LeafWrapper)
penzai/core/selectors.py:552
Function_wrap_selected_nodes
Custom wrapper hook that intercepts selected nodes.
penzai/core/_treescope_handlers/selection_rendering.py:78
Functionadd_constraints
(keypath, pattern: Any, value: Any)
penzai/core/shapecheck.py:731
Functionadd_parameter_prefix
Prepends a prefix to all parameter names inside the tree. This function can be used to avoid name conflicts when combining sublayers into a large
penzai/deprecated/v1/nn/parameters.py:574
Functionannotate_shapes
Annotates shapes in a model or layer, for inputs with this input structure. Args: root: The layer or model to annotate. dummy_input: A dumm
penzai/deprecated/v1/toolshed/annotate_shapes.py:65
Methodapply
(self, values, /, **kwargs)
penzai/core/named_axes.py:658
Functionarange
Convenience function to create a range along a named axis. This is shorthand for ``wrap(jnp.arange(...)).tag(name)``. Args: name: Name for t
penzai/core/named_axes.py:1855
Functionas_array_structure
Abstracts a concrete tree of values into a tree of `ArraySpec` nodes. Args: tree: The tree to get an array structure for. Returns: A cop
penzai/core/shapecheck.py:1210
Methodas_frozen
Initializes the parameter, returning an equivalent frozen one.
penzai/deprecated/v1/data_effects/local_state.py:128
Methodas_namedarrayview
(self)
penzai/core/named_axes.py:1699
Methodask
(self)
penzai/deprecated/v1/data_effects/side_input.py:85
Functionassert_no_parameter_slots
Asserts that the given model has no ParameterSlot subtrees.
penzai/nn/parameters.py:120
Methodat
Helper property for index update functionality. Lifts the ``jax.Array.at[...]`` syntax to also work for Penzai NamedArrays. Similar to direc
penzai/core/named_axes.py:1112
Functionattach_shared_parameters
Wraps a submodel in a handler that takes ownership of shareable params. Penzai models must have only one copy of each parameter in the model pytree
penzai/deprecated/v1/nn/parameters.py:489
Functionattr_style_fn
(field_name)
penzai/core/_treescope_handlers/struct_handler.py:88
Methodbad
(x)
tests/core/variables_test.py:314
Functionbasic_interactive_setup
Sets up IPython for interactive use with Treescope. This is a compatibility wrapper for `treescope.basic_interactive_setup`, which also turns on
penzai/treescope/_compatibility_setup.py:128
Methodbias_initializer
(prng_key)
penzai/deprecated/v1/nn/linear_and_affine.py:689
Functionbroken_handler_refs
Collects effect types of each broken `HandledEffectRef` in a (sub)model. A broken handler reference occurs when a model contains a `HandledEffectRe
penzai/deprecated/v1/data_effects/effect_base.py:207
Methodbuild
( cls, root_rng: PRNGKeyArray, model: ModelPyTree, optimizer_def: optax.GradientTransf
penzai/toolshed/basic_training.py:180
Functionbuild_train_step_fn
Builds a train step function for a common training loop. For simplicity, the output of the train step function is the third output of the loss fu
penzai/deprecated/v1/toolshed/basic_training.py:236
Methodbuilder
(init_base_rng, some_value)
tests/nn/layer_stack_test.py:112
Functioncall_and_extract_submodel
Calls a model with an argument, and captures the selected submodel. This function is designed to enable quickly exploring the behavior of small p
penzai/toolshed/isolate_submodel.py:120
Functioncall_and_extract_submodel
Calls a model with an argument, and captures the selected submodel. This function is designed to enable quickly exploring the behavior of small p
penzai/deprecated/v1/toolshed/isolate_submodel.py:89
Methodcapture
Captures positional and keyword arguments from this call.
penzai/deprecated/v1/toolshed/unflaxify.py:49
Functioncheck_layer
Checks that a layer has been configured correctly by tracing it. This function runs the layer under `jax.eval_shape` and passes in a dummy input
penzai/deprecated/v1/toolshed/check_layers_by_tracing.py:66
Functioncheck_structure
Checks that a structure of values matches a pattern. Args: value: A PyTree of arrays to check. pattern: A PyTree of `ArraySpec` leaves to c
penzai/core/shapecheck.py:699
Functionchecked_layer_call
Decorator for ``Layer.__call__`` to add shape-checking and name scopes.
penzai/deprecated/v1/core/layer.py:65
Functioncolor_registration_decorator
(cls)
penzai/deprecated/v1/data_effects/effect_base.py:118
Functioncombine
Combines leaves from multiple partitions. This function can be used to reverse the results of calling `partition` on a selector. It walks two or
penzai/core/partitioning.py:59
Functioncombine_pairwise_subtrees
(keypath, tree_a, tree_b)
penzai/core/partitioning.py:95
Functioncompute_loss
Computes loss, aux out, and loss state for a single example.
penzai/deprecated/v1/toolshed/basic_training.py:207
Functioncompute_loss_and_updates
Computes loss, aux out, and state updates for a single example.
penzai/toolshed/basic_training.py:102
Functioncompute_training_outputs_and_updates
Runs a loss function and computes all of its outputs. This function runs the model and loss function and updates the corresponding parameters in
penzai/deprecated/v1/toolshed/basic_training.py:170
Functionconcatenate
Concatenates a sequence of named arrays along a named axis. Args: arrays: Sequence of named arrays to concatenate, which must have the same
penzai/core/named_axes.py:1928
Functiondecorator
(cls)
penzai/core/struct.py:181
Methoddisable
Returns a disabled version of this layer.
penzai/nn/dropout.py:90
Methoddisable
Returns a disabled version of this layer.
penzai/deprecated/v1/nn/dropout.py:98
Functiondisable_interactive_context
Raises an error, since disabling is no longer supported. Originally, global overrides for Penzai/Treescope ContextualValue objects needed to be t
penzai/treescope/_compatibility_setup.py:157
Functiondisplay
Displays a value as an interactively foldable object. This is a compatibility wrapper for `treescope.display`, which also formats objects impleme
penzai/treescope/_compatibility_setup.py:45
Functiondisplay_selection_streaming
Displays a top-level selection object in IPython. This function produces a rendering of either the selection itself, or its selected value. Howev
penzai/core/_treescope_handlers/selection_rendering.py:274
Functiondisplayhook_with_ipython
Custom displayhook to display results with IPython.
penzai/toolshed/patch_ipdb.py:36
Methoddiv
(self, values, /, **kwargs)
penzai/core/named_axes.py:673
Methoddivide
(self, values, /, **kwargs)
penzai/core/named_axes.py:670
Methoddtype
The dtype of the wrapped array.
penzai/core/named_axes.py:693
Methoddtype
(self)
penzai/core/named_axes.py:1586
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_output.py:65
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_output.py:85
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_output.py:120
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_output.py:149
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/local_state.py:117
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/local_state.py:164
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/local_state.py:197
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/local_state.py:229
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/local_state.py:249
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/local_state.py:322
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_input.py:63
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_input.py:74
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_input.py:92
Methodeffect_protocol
(cls)
penzai/deprecated/v1/data_effects/side_input.py:128
← previousnext →401–500 of 1,092, ranked by callers