pyvene.models.basic_utils#
Basic Utils
Functions
|
From simple locale to nested one. |
|
Measure how close a rotation m is close to a permutation m |
|
Count parameters of a model that require gradients |
|
Create directory if not exist |
|
Convert an embedding to a distribution over the vocabulary |
|
Format the token for some path patching experiment to show decoding diff |
|
Get batch size based on the input |
|
Return the max depth of the input list |
|
Help function to convert string to type |
|
Generate harmonic sigmoid mask |
Generate a random permutation matrix |
|
|
Set seed. |
|
Generate sigmoid mask |
|
Pretty print the top n values of a distribution over the vocabulary |