in neuron_viewer/src/types.ts [98:122]
export function dstStringToNodeType(dst: string): NodeType {
switch (dst) {
case "autoencoder_latent":
return NodeType.AUTOENCODER_LATENT;
case "mlp_autoencoder_latent":
return NodeType.MLP_AUTOENCODER_LATENT;
case "attention_autoencoder_latent":
return NodeType.ATTENTION_AUTOENCODER_LATENT;
case "online_autoencoder_latent":
return NodeType.AUTOENCODER_LATENT;
case "mlp_post_act":
return NodeType.MLP_NEURON;
case "attn_write_norm":
return NodeType.ATTENTION_HEAD;
case "flattened_attn_write_to_latent_summed_over_heads":
return NodeType.AUTOENCODER_LATENT_BY_TOKEN_PAIR;
case "flattened_attn_write_to_latent_summed_over_heads_batched":
return NodeType.AUTOENCODER_LATENT_BY_TOKEN_PAIR;
case "residual":
return NodeType.RESIDUAL_STREAM_CHANNEL;
// Flesh out with more as we support more derived scalar types.
default:
throw new Error(`Invalid derived scalar type: ${dst}`);
}
}