Skip to content

Commit

Permalink
Add random feature button
Browse files Browse the repository at this point in the history
  • Loading branch information
liambai committed Nov 2, 2024
1 parent c5123d4 commit 262fd3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions viz/src/SAEVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import HomeNavigator from "@/components/HomeNavigator";
import "./App.css";
import { Toggle } from "./components/ui/toggle";
import { useParams, useNavigate } from "react-router-dom";
import { Button } from "@/components/ui/button";
import { Dices } from "lucide-react";

const NUM_SEQS_TO_DISPLAY = 9;
const SHOW_MODEL_SELECTOR = false;
Expand Down Expand Up @@ -158,6 +160,13 @@ function SAEVisualizer() {
visualize its activation pattern.
</p>
</div>
<Button
variant="outline"
className="mb-3 mx-3"
onClick={() => handleFeatureChange(Math.floor(Math.random() * config.numHiddenDims))}
>
<Dices className="w-4 h-4 mr-2" /> Random Feature
</Button>
<Separator />
</SidebarHeader>
<SidebarContent>
Expand Down

0 comments on commit 262fd3c

Please sign in to comment.