Skip to content

Commit 28abc49

Browse files
committed
refactor: rename package
1 parent a56ddbb commit 28abc49

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

22
## Introduction
3-
LLM visualizer is a small toolkit to visualize LLM.
3+
token visualizer is a token-level visualization tool to visualize LLM.
44

55
## Quick start
66

77
### Installation
88

99
Run the following command to install the package.
1010
```shell
11-
git clone git@github.com:FateScript/llm_visualizer.git
12-
cd llm_visualizer
11+
git clone git@github.com:FateScript/token_visualizer.git
12+
cd token_visualizer
1313
pip install -v -e . # or python3 setup.py develop
1414
```
1515

@@ -27,6 +27,6 @@ pip install -v -e . # or python3 setup.py develop
2727
## Related projects/websites
2828

2929
* [LLM architecture visualization](https://bbycroft.net/llm)
30-
* [PPL visualization](https://bbycroft.net/ppl)
30+
* [perplexity visualization](https://bbycroft.net/ppl)
3131

3232
## Acknowledgement

setup.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[metadata]
2-
name = llm_visualizer
2+
name = token_visualizer
33
version = 0.0.1
4-
description = visualize tools for large language models
4+
description = token level visualization tools for large language models
55
author = Feng Wang
66
author_email = wangfeng19950315@163.com
77
long_description = file: README.md
88
long_description_content_type = text/markdown
9-
url = https://github.com/FateScript/llm_visualizer
9+
url = https://github.com/FateScript/token_visualizer
1010

1111
[options]
1212
packages = find:
@@ -33,7 +33,7 @@ multi_line_output = 3
3333
include_trailing_comma = true
3434
balanced_wrapping = true
3535
known_thirdparty = numpy, loguru, gradio, torch, openai, transformers, retrying, sentencepiece, python-dotenv
36-
KNOWN_MYSELF = llm_visualizer
36+
KNOWN_MYSELF = token_visualizer
3737
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,MYSELF,LOCALFOLDER
3838
no_lines_before=STDLIB
3939
default_section = FIRSTPARTY
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

llm_visualizer/utils.py renamed to token_visualizer/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
from dotenv import load_dotenv
77

8-
import llm_visualizer
8+
import token_visualizer
99

1010
__all__ = ["css_style", "ensure_os_env"]
1111

1212

1313
def css_style() -> str:
14-
with open(os.path.join(os.path.dirname(llm_visualizer.__file__), "main.css")) as f:
14+
with open(os.path.join(os.path.dirname(token_visualizer.__file__), "main.css")) as f:
1515
css_style = f.read()
1616
css_html = f"<style>{css_style}</style>"""
1717
return css_html

visual_inference.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
import gradio as gr
66
from loguru import logger
77

8-
import llm_visualizer
9-
from llm_visualizer import css_style, ensure_os_env
8+
from token_visualizer import css_style, ensure_os_env
109

1110
BASE_URL = ensure_os_env("BASE_URL")
1211
OPENAI_API_KEY = ensure_os_env("OPENAI_KEY")
1312

14-
# MODEL = llm_visualizer.TransformerModel()
15-
MODEL = llm_visualizer.OpenAIProxyModel(
13+
# MODEL = token_visualizer.TransformerModel()
14+
MODEL = token_visualizer.OpenAIProxyModel(
1615
base_url=BASE_URL,
1716
api_key=OPENAI_API_KEY,
1817
model_name="gpt-4-turbo-preview",

0 commit comments

Comments
 (0)