Skip to content

Comment on Ask HN: What fun and interesting project(s) are you working on?

Comments

I've actually been working on a visualizer for AI models. You prompt the model and it shows the tokens that were chosen, the weightings at each choice and the top X other tokens that could have been chosen at each node.

You can then click a different path and nudge the model towards that decision, like targeted fine-tuning.

It doesn't really have much practical use given the size of the models that actually get used, but I like it for demystifying how LLMs work internally and I'll probably use it for a presentation along those lines at some point in the future.

It uses React Flow (https://reactflow.dev/) for the visualization, which is pretty great for the purpose. I originally started out using Mermaid but I had to do a lot of hacking/abuse of Mermaid to get it to do what I wanted.

I've only really tried it against GPT2 so far...mostly because my hardware won't handle anything much bigger. Would be interesting to see a bigger model, but of course there's a lot more to the mainstream ones than just the model and basic token selection.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.