Skip to content

Commit

Permalink
Merge branch 'main' of github.com:labmlai/inspectus
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshith-403 committed Oct 19, 2024
2 parents e67a861 + 7b8c4f5 commit 28eed24
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,16 @@ This tool is used to visualize some metric related to tokens. This supports mult

```python
import inspectus

inspectus.tokens(['hello', 'world'], np.random.rand(2))
inspectus.tokens(["Hello", " World", "!"], {
'loss': [-7.375, -8.312, -7.5625],
'entropy': [3.323, 1.0666, 0.432]
}, token_info=["info 1", "info 2", "info 3"])
```

Check out the notebook here: [GPT2 example](https://github.com/labmlai/inspectus/blob/main/notebooks/token_viz.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/labmlai/inspectus/blob/main/notebooks/token_viz.ipynb)


## Distribution Plot
The distribution plot is a plot that shows the distribution of a series of data. At each step,
the distribution of the data is calculated and maximum of 5 bands are drawn from 9 basis points.
Expand Down

0 comments on commit 28eed24

Please sign in to comment.