Skip to content

Commit

Permalink
[fix] visualizer init
Browse files Browse the repository at this point in the history
  • Loading branch information
Immortalise committed Sep 12, 2024
1 parent 70f8a98 commit 31d2e0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions promptbench/utils/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
import copy

class Visualizer:
def __init__(self, model: LLMModel) -> None:
def __init__(self, llm: LLMModel) -> None:
"""
Initialize the Visualizer class.
Parameters:
- model (LLMModel): The model to visualize.
- llm (LLMModel): The llm to visualize.
Attributes:
- model: The inference pipeline of the provided model.
- tokenizer (Tokenizer): Tokenizer associated with the model.
"""
self.model = model.infer_model.pipe
self.tokenizer = model.infer_model.tokenizer
self.model = llm.model.model
self.tokenizer = llm.model.tokenizer

def _map_subwords_to_words(self, sentence: str):
"""
Expand Down

0 comments on commit 31d2e0d

Please sign in to comment.