Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/google-deepmind/penzai
/ functions
Functions
1,092 in github.com/google-deepmind/penzai
⨍
Functions
1,092
◇
Types & classes
360
↳
Endpoints
3
Method
rebuild
Processes nodes in the remainder to rebuild the tree.
penzai/core/selectors.py:221
Function
redirecting_dir
()
penzai/experimental/v2/__init__.py:60
Function
redirecting_getattr
(name: str)
penzai/experimental/v2/__init__.py:51
Method
redirecting_interceptor
(next_fun, args, kwargs, context)
penzai/toolshed/unflaxify.py:175
Method
redirecting_interceptor
(next_fun, args, kwargs, context)
penzai/deprecated/v1/toolshed/unflaxify.py:146
Method
refine_fn
(value)
tests/core/selectors_test.py:625
Function
register_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
Function
register_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
Function
reifying_interceptor
(next_fun, args, kwargs, context)
penzai/toolshed/unflaxify.py:317
Function
reifying_interceptor
(next_fun, args, kwargs, context)
penzai/deprecated/v1/toolshed/unflaxify.py:271
Function
render_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
Function
reparent
(shareable_uninit: ShareableUninitializedParameter)
penzai/deprecated/v1/nn/parameters.py:516
Function
replacement_init
(self, *args, **kwargs)
penzai/core/struct.py:356
Method
run
(self, **kwargs)
docs/ext/nb_output_cell_to_iframe.py:39
Function
run_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
Method
run_traced
(rng_key)
tests/models/transformer_llamalike_test.py:99
Method
safe_filter_fn
(*args)
penzai/core/selectors.py:801
Function
saving_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
Function
scan
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
Function
scoped_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
Method
set
(self, values, /, **kwargs)
penzai/core/named_axes.py:655
Method
set
(self, value: _T)
penzai/deprecated/v1/data_effects/local_state.py:255
Method
setUp
(self)
tests/treescope/ndarray_adapters_test.py:28
Function
setup
(app: application.Sphinx)
docs/ext/pz_alias_rewrite.py:37
Function
setup
(app: application.Sphinx)
docs/ext/nb_output_cell_to_iframe.py:54
Method
setup
(self)
tests/toolshed/unflaxify_test.py:54
Method
setup
(self)
tests/toolshed/unflaxify_test.py:64
Method
setup
(self)
tests/deprecated/v1/toolshed/unflaxify_test.py:55
Method
setup
(self)
tests/deprecated/v1/toolshed/unflaxify_test.py:65
Function
sharded_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
Function
sharding_for_leaf
(leaf)
penzai/toolshed/sharding_util.py:71
Method
should_autovisualize
(self, array: named_axes.NamedArrayBase)
penzai/core/_treescope_handlers/named_axes_handlers.py:254
Function
show
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
Method
show_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
Function
show_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
Function
show_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
Method
show_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
Function
stack
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
Function
subst_leaf
(keypath, leaf)
penzai/core/shapecheck.py:1165
Function
substitute_pz_in_autodoc_docstring
Rewrites docstrings for objects defined in `penzai.pz` to add alias links.
docs/ext/pz_alias_rewrite.py:22
Function
swapped
(x, y)
penzai/core/named_axes.py:348
Method
tag
(self, *names)
penzai/core/named_axes.py:1744
Method
target
(stuff)
tests/toolshed/model_rewiring_test.py:119
Method
target
(stuff)
tests/deprecated/v1/toolshed/model_rewiring_test.py:119
Method
tell
(self, value: _T, /)
penzai/deprecated/v1/data_effects/side_output.py:61
Method
tell
(self, value: _T, /)
penzai/deprecated/v1/data_effects/side_output.py:113
Function
temperature_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
Function
temperature_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
Method
test_adapter_positional_numpy_consistency
(self, array_type, dtype)
tests/treescope/ndarray_adapters_test.py:36
Method
test_add_bias
(self)
tests/nn/linear_and_affine_test.py:131
Method
test_add_bias
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:81
Method
test_affine
(self)
tests/nn/linear_and_affine_test.py:146
Method
test_affine
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:87
Method
test_any_structure
(self)
tests/core/shapecheck_test.py:624
Method
test_array_rendering_without_error
(self, array_type, dtype)
tests/treescope/ndarray_adapters_test.py:202
Method
test_array_structure_wrong
(self)
tests/core/shapecheck_test.py:61
Method
test_assert_no_parameter_slots
(self)
tests/nn/parameters_test.py:63
Method
test_auto_nmap
(self)
tests/toolshed/auto_nmap_test.py:27
Method
test_auto_order_types
(self)
tests/core/auto_order_types_test.py:24
Method
test_bad_named_shapes
(self)
tests/core/shapecheck_test.py:107
Method
test_bad_shapes_dtypes
(self)
tests/core/shapecheck_test.py:72
Method
test_bad_tag
(self)
tests/core/named_axes_test.py:289
Method
test_bad_untag
(self)
tests/core/named_axes_test.py:260
Method
test_bind_and_unfreeze
(self)
tests/core/variables_test.py:171
Method
test_bind_variables
(self)
tests/core/variables_test.py:149
Method
test_binop_lifts
(self, which)
tests/core/named_axes_test.py:628
Method
test_broadcast_to
(self, value_structure, positional_shape, named_shape)
tests/core/named_axes_test.py:843
Method
test_build_and_run_gemma
( self, num_kv_heads: int, query_head_multiplier: int, parameter_dtype, activati
tests/models/transformer_llamalike_test.py:90
Method
test_build_and_run_gemma
( self, single_kv_head: bool, parameter_dtype, activation_dtype )
tests/deprecated/v1/example_models/gemma_test.py:67
Method
test_build_and_run_layer_stack
(self)
tests/models/transformer_llamalike_test.py:241
Method
test_build_and_run_sampling_mode
( self, num_kv_heads: int, query_head_multiplier: int, parameter_dtype, activati
tests/models/transformer_llamalike_test.py:184
Method
test_build_and_run_sampling_mode
( self, single_kv_head: bool, parameter_dtype, activation_dtype )
tests/deprecated/v1/example_models/gemma_test.py:135
Method
test_build_deterministic_mlp
(self)
tests/models/simple_mlp_test.py:28
Method
test_build_deterministic_mlp
(self)
tests/deprecated/v1/example_models/simple_mlp_test.py:29
Method
test_build_dropout_mlp
(self)
tests/models/simple_mlp_test.py:40
Method
test_build_dropout_mlp
(self)
tests/deprecated/v1/example_models/simple_mlp_test.py:35
Method
test_build_lora
(self)
tests/toolshed/lora_test.py:29
Method
test_build_lora
(self)
tests/deprecated/v1/toolshed/lora_test.py:30
Method
test_can_finetune_with_lora
(self)
tests/toolshed/lora_test.py:57
Method
test_can_finetune_with_lora
(self)
tests/deprecated/v1/toolshed/lora_test.py:53
Method
test_capture_with_states_shared_params_and_random
(self)
tests/toolshed/isolate_submodel_test.py:50
Method
test_capture_with_states_shared_params_and_random
(self)
tests/deprecated/v1/toolshed/isolate_submodel_test.py:47
Method
test_category_predicate
(self)
tests/deprecated/v1/data_effects/local_state_test.py:172
Method
test_checked_layer_call
(self)
tests/deprecated/v1/shapecheck_layer_test.py:27
Method
test_combine_compatible_but_not_prefix
(self)
tests/core/partitioning_test.py:103
Method
test_combine_incomplete
(self)
tests/core/partitioning_test.py:123
Method
test_combine_multi
(self)
tests/core/partitioning_test.py:146
Method
test_combine_same_structure
(self)
tests/core/partitioning_test.py:77
Method
test_complicated_dict_indexed_update
(self)
tests/core/named_axes_test.py:1007
Method
test_consistent_overlap_vars_for_axes_and_unpack
(self)
tests/core/shapecheck_test.py:576
Method
test_constant_rescale
(self)
tests/nn/linear_and_affine_test.py:166
Method
test_constant_rescale
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:99
Method
test_convenience_constructors
(self)
tests/core/named_axes_test.py:675
Method
test_dataclass_util
(self)
tests/core/struct_pytree_dataclass_test.py:421
Method
test_early_error_remaining_unsolved
(self)
tests/core/shapecheck_test.py:268
Method
test_einsum_renaming_diagonalizing
(self)
tests/nn/linear_and_affine_test.py:77
Method
test_einsum_renaming_diagonalizing
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:52
Method
test_einsum_simple
(self)
tests/nn/linear_and_affine_test.py:58
Method
test_einsum_simple
(self)
tests/deprecated/v1/nn/linear_and_affine_test.py:42
Method
test_einsum_verbose
(self)
tests/nn/linear_and_affine_test.py:39
← previous
next →
701–800 of 1,092, ranked by callers