MCPcopy Create free account

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

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

Methodrebuild
Processes nodes in the remainder to rebuild the tree.
penzai/core/selectors.py:221
Functionredirecting_dir
()
penzai/experimental/v2/__init__.py:60
Functionredirecting_getattr
(name: str)
penzai/experimental/v2/__init__.py:51
Methodredirecting_interceptor
(next_fun, args, kwargs, context)
penzai/toolshed/unflaxify.py:175
Methodredirecting_interceptor
(next_fun, args, kwargs, context)
penzai/deprecated/v1/toolshed/unflaxify.py:146
Methodrefine_fn
(value)
tests/core/selectors_test.py:625
Functionregister_as_default
Registers treescope as the default IPython renderer. This is a compatibility wrapper for `treescope.register_as_default`, which also turns on sup
penzai/treescope/_compatibility_setup.py:99
Functionregister_effect_color
Decorator to register a treescope-rendering color for a given effect. Args: color: The color to assign, as a CSS string. Returns: A deco
penzai/deprecated/v1/data_effects/effect_base.py:107
Functionreifying_interceptor
(next_fun, args, kwargs, context)
penzai/toolshed/unflaxify.py:317
Functionreifying_interceptor
(next_fun, args, kwargs, context)
penzai/deprecated/v1/toolshed/unflaxify.py:271
Functionrender_short_struct_summary
Renders a short summary of a struct. Can be used by other handlers that manipulate structs. Args: the_struct: Struct to render. Returns:
penzai/core/_treescope_handlers/struct_handler.py:47
Functionreparent
(shareable_uninit: ShareableUninitializedParameter)
penzai/deprecated/v1/nn/parameters.py:516
Functionreplacement_init
(self, *args, **kwargs)
penzai/core/struct.py:356
Methodrun
(self, **kwargs)
docs/ext/nb_output_cell_to_iframe.py:39
Functionrun_and_interleave_intermediates
Interleaves intermediate values into a model. Args: root: The layer or model to annotate. argument: An argument to run the model with.
penzai/deprecated/v1/toolshed/interleave_intermediates.py:62
Methodrun_traced
(rng_key)
tests/models/transformer_llamalike_test.py:99
Methodsafe_filter_fn
(*args)
penzai/core/selectors.py:801
Functionsaving_all_intermediates
Returns a copy of `model` with `SaveIntermediate` layers inserted. Args: model: The model to copy. intermediates_group: The name of the gro
penzai/toolshed/save_intermediates.py:70
Functionscan
Scan a function over a named array axis while carrying along state. This function wraps `jax.lax.scan` to allow scanning over a named axis instead
penzai/core/named_axes.py:2031
Functionscoped_auto_state_var_labels
Context manager for using scoped auto-generated StateVariable labels. Within this context manager, any StateVariable that does not have an explicit
penzai/core/variables.py:690
Methodset
(self, values, /, **kwargs)
penzai/core/named_axes.py:655
Methodset
(self, value: _T)
penzai/deprecated/v1/data_effects/local_state.py:255
MethodsetUp
(self)
tests/treescope/ndarray_adapters_test.py:28
Functionsetup
(app: application.Sphinx)
docs/ext/pz_alias_rewrite.py:37
Functionsetup
(app: application.Sphinx)
docs/ext/nb_output_cell_to_iframe.py:54
Methodsetup
(self)
tests/toolshed/unflaxify_test.py:54
Methodsetup
(self)
tests/toolshed/unflaxify_test.py:64
Methodsetup
(self)
tests/deprecated/v1/toolshed/unflaxify_test.py:55
Methodsetup
(self)
tests/deprecated/v1/toolshed/unflaxify_test.py:65
Functionsharded_init
Initializes a model, with constants and variables sharded based on a mesh. Args: initializer: The initializer to call. Should return a PyTree o
penzai/toolshed/sharding_util.py:148
Functionsharding_for_leaf
(leaf)
penzai/toolshed/sharding_util.py:71
Methodshould_autovisualize
(self, array: named_axes.NamedArrayBase)
penzai/core/_treescope_handlers/named_axes_handlers.py:254
Functionshow
Shows a list of objects inline, like python print, but with rich display. This is a compatibility wrapper for `treescope.show`, which also formats
penzai/treescope/_compatibility_setup.py:75
Methodshow_selection
Renders the selection in IPython. This method is intended to visualize the selection object itself, and renders boxes around the selected nod
penzai/core/selectors.py:1282
Functionshow_token_array
Renders an array of tokens. Args: tokens: An array of token IDs. vocab: Vocabulary, usually a SentencePiece tokenizer. axis_name_order:
penzai/toolshed/token_visualization.py:95
Functionshow_token_scores
Renders an array of token scores, but with the scored tokens as words. Args: tokens: An array of token IDs. scores: An array of token score
penzai/toolshed/token_visualization.py:153
Methodshow_value
Renders the original tree in IPython, expanding up to the selected nodes. This method is intended to visualize a value but emphasizing the select
penzai/core/selectors.py:1301
Functionstack
Stacks a sequence of named arrays along a named axis. Args: arrays: Sequence of named arrays to stack, which must have the same shape. axis
penzai/core/named_axes.py:1958
Functionsubst_leaf
(keypath, leaf)
penzai/core/shapecheck.py:1165
Functionsubstitute_pz_in_autodoc_docstring
Rewrites docstrings for objects defined in `penzai.pz` to add alias links.
docs/ext/pz_alias_rewrite.py:22
Functionswapped
(x, y)
penzai/core/named_axes.py:348
Methodtag
(self, *names)
penzai/core/named_axes.py:1744
Methodtarget
(stuff)
tests/toolshed/model_rewiring_test.py:119
Methodtarget
(stuff)
tests/deprecated/v1/toolshed/model_rewiring_test.py:119
Methodtell
(self, value: _T, /)
penzai/deprecated/v1/data_effects/side_output.py:61
Methodtell
(self, value: _T, /)
penzai/deprecated/v1/data_effects/side_output.py:113
Functiontemperature_sample_pyloop
Runs temperature sampling in a Python for loop. Args: model: The converted model we are running inference with. prompt: A named array of pr
penzai/models/transformer/simple_decoding_loop.py:29
Functiontemperature_sample_pyloop
Runs temperature sampling in a Python for loop. Args: model: The converted model we are running inference with. initial_cache_state: The in
penzai/deprecated/v1/example_models/gemma/simple_decoding_loop.py:186
Methodtest_adapter_positional_numpy_consistency
(self, array_type, dtype)
tests/treescope/ndarray_adapters_test.py:36
Methodtest_add_bias
(self)
tests/nn/linear_and_affine_test.py:131
Methodtest_add_bias
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:81
Methodtest_affine
(self)
tests/nn/linear_and_affine_test.py:146
Methodtest_affine
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:87
Methodtest_any_structure
(self)
tests/core/shapecheck_test.py:624
Methodtest_array_rendering_without_error
(self, array_type, dtype)
tests/treescope/ndarray_adapters_test.py:202
Methodtest_array_structure_wrong
(self)
tests/core/shapecheck_test.py:61
Methodtest_assert_no_parameter_slots
(self)
tests/nn/parameters_test.py:63
Methodtest_auto_nmap
(self)
tests/toolshed/auto_nmap_test.py:27
Methodtest_auto_order_types
(self)
tests/core/auto_order_types_test.py:24
Methodtest_bad_named_shapes
(self)
tests/core/shapecheck_test.py:107
Methodtest_bad_shapes_dtypes
(self)
tests/core/shapecheck_test.py:72
Methodtest_bad_tag
(self)
tests/core/named_axes_test.py:289
Methodtest_bad_untag
(self)
tests/core/named_axes_test.py:260
Methodtest_bind_and_unfreeze
(self)
tests/core/variables_test.py:171
Methodtest_bind_variables
(self)
tests/core/variables_test.py:149
Methodtest_binop_lifts
(self, which)
tests/core/named_axes_test.py:628
Methodtest_broadcast_to
(self, value_structure, positional_shape, named_shape)
tests/core/named_axes_test.py:843
Methodtest_build_and_run_gemma
( self, num_kv_heads: int, query_head_multiplier: int, parameter_dtype, activati
tests/models/transformer_llamalike_test.py:90
Methodtest_build_and_run_gemma
( self, single_kv_head: bool, parameter_dtype, activation_dtype )
tests/deprecated/v1/example_models/gemma_test.py:67
Methodtest_build_and_run_layer_stack
(self)
tests/models/transformer_llamalike_test.py:241
Methodtest_build_and_run_sampling_mode
( self, num_kv_heads: int, query_head_multiplier: int, parameter_dtype, activati
tests/models/transformer_llamalike_test.py:184
Methodtest_build_and_run_sampling_mode
( self, single_kv_head: bool, parameter_dtype, activation_dtype )
tests/deprecated/v1/example_models/gemma_test.py:135
Methodtest_build_deterministic_mlp
(self)
tests/models/simple_mlp_test.py:28
Methodtest_build_deterministic_mlp
(self)
tests/deprecated/v1/example_models/simple_mlp_test.py:29
Methodtest_build_dropout_mlp
(self)
tests/models/simple_mlp_test.py:40
Methodtest_build_dropout_mlp
(self)
tests/deprecated/v1/example_models/simple_mlp_test.py:35
Methodtest_build_lora
(self)
tests/toolshed/lora_test.py:29
Methodtest_build_lora
(self)
tests/deprecated/v1/toolshed/lora_test.py:30
Methodtest_can_finetune_with_lora
(self)
tests/toolshed/lora_test.py:57
Methodtest_can_finetune_with_lora
(self)
tests/deprecated/v1/toolshed/lora_test.py:53
Methodtest_capture_with_states_shared_params_and_random
(self)
tests/toolshed/isolate_submodel_test.py:50
Methodtest_capture_with_states_shared_params_and_random
(self)
tests/deprecated/v1/toolshed/isolate_submodel_test.py:47
Methodtest_category_predicate
(self)
tests/deprecated/v1/data_effects/local_state_test.py:172
Methodtest_checked_layer_call
(self)
tests/deprecated/v1/shapecheck_layer_test.py:27
Methodtest_combine_compatible_but_not_prefix
(self)
tests/core/partitioning_test.py:103
Methodtest_combine_incomplete
(self)
tests/core/partitioning_test.py:123
Methodtest_combine_multi
(self)
tests/core/partitioning_test.py:146
Methodtest_combine_same_structure
(self)
tests/core/partitioning_test.py:77
Methodtest_complicated_dict_indexed_update
(self)
tests/core/named_axes_test.py:1007
Methodtest_consistent_overlap_vars_for_axes_and_unpack
(self)
tests/core/shapecheck_test.py:576
Methodtest_constant_rescale
(self)
tests/nn/linear_and_affine_test.py:166
Methodtest_constant_rescale
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:99
Methodtest_convenience_constructors
(self)
tests/core/named_axes_test.py:675
Methodtest_dataclass_util
(self)
tests/core/struct_pytree_dataclass_test.py:421
Methodtest_early_error_remaining_unsolved
(self)
tests/core/shapecheck_test.py:268
Methodtest_einsum_renaming_diagonalizing
(self)
tests/nn/linear_and_affine_test.py:77
Methodtest_einsum_renaming_diagonalizing
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:52
Methodtest_einsum_simple
(self)
tests/nn/linear_and_affine_test.py:58
Methodtest_einsum_simple
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:42
Methodtest_einsum_verbose
(self)
tests/nn/linear_and_affine_test.py:39
← previousnext →701–800 of 1,092, ranked by callers