From 7b8c4f5be82e3309e7dc0282f4d3357d4919932b Mon Sep 17 00:00:00 2001 From: Lakshith Nishshanke <37945916+lakshith-403@users.noreply.github.com> Date: Sat, 19 Oct 2024 16:51:43 +0530 Subject: [PATCH] update token viz sample --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f39281f..842d33c 100644 --- a/README.md +++ b/README.md @@ -158,8 +158,10 @@ 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)