diff --git a/python/circuitsvis/activations.py b/python/circuitsvis/activations.py index 1f634c21..321e9ba4 100644 --- a/python/circuitsvis/activations.py +++ b/python/circuitsvis/activations.py @@ -46,6 +46,11 @@ def text_neuron_activations( f"activations must be of type np.ndarray, torch.Tensor, or list, not {type(activations)}" ) + if isinstance(tokens, int): + raise TypeError( + f"tokens should be list of tokens as strings" + ) + return render( "TextNeuronActivations", tokens=tokens,