GitXplorerGitXplorer
p

Token-Flow

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
31203ad5ed407255e0ab77678456ed46d9ea0016

Update HTML title to 'Token-Flow' and clean up comments in index.html; minor adjustments in App.js for clarity

ppierizvi committed 8 days ago
Unverified
4bf1aa73c95b050c3e0e81a65d9e5121b154a53b

Fix text alignment and enhance styling for generated text display; adjust decoding logic in generation process

ppierizvi committed 9 days ago
Unverified
eef5365ccde4cf208bbb06e9a2a9ce50e9308e6c

Rename project title in README to reflect updated branding; clarify application purpose

ppierizvi committed 10 days ago
Unverified
f0fb95a65aa5bec724ab264ade8dcc590078f572

Add app title to main layout; enhance styling for improved visibility

ppierizvi committed 10 days ago
Unverified
ab04fe03707f2fc48c22fa5ddc2bcfb8647db523

Refactor TokenGraph component and styles for improved layout and visualization; enhance legend display

ppierizvi committed 11 days ago
Unverified
9e6950b5012048233b9ca5984305e618c82b30dd

Add support for multiple text generation methods; enhance UI and token display

ppierizvi committed 11 days ago

README

The README file for this repository.

TOKEN FLOW

A web application that visualizes GPT model token generation and probabilities in real-time. Built with React frontend and Python backend.

Features

  • Interactive text generation from prompts
  • Visual token nodes graph with interaction
  • Token probability analysis
  • Real-time decoding visualization
  • Customizable generation parameters

Project Structure

Gpt2-token-prob/
├──gpt_visualizer/
                  ├──frontend/           # React application
                  └── backend/           # Python Flask API

Getting Started

Prerequisites

  • Node.js and npm
  • Python 3.x
  • Virtual environment (venv)

Installation

  1. Backend Setup
cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Frontend Setup
cd frontend
npm install

Running the Application

  1. Start the backend server:
cd backend
source venv/bin/activate  # On Windows: venv\Scripts\activate
./run.sh  # On Windows: run.bat
  1. Start the frontend development server:
cd frontend
npm start

The application will be available at http://localhost:3000

Development

  • Frontend is built with React and uses Material-UI for components
  • Backend uses Flask for API endpoints
  • Token visualization implemented using React-based graph visualization

License

This project is licensed under the MIT License.