Skip to content

ayerofieiev-tt/code-humanizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Humanizer

A web application that transforms compiler-generated TT-NN code into human-readable format using Anthropic's Claude API.

Features

  • Transform compiler-generated PyTorch TT-NN code into human-friendly format
  • Support for various model architectures (BERT, GPT, T5, ResNet, VGG, etc.)
  • Interactive web interface for code input and transformation
  • Easy copy-paste functionality for results

Prerequisites

  • Node.js (v14 or higher)
  • An Anthropic API key

Installation

  1. Clone the repository:

    git clone https://github.com/ayerofieiev-tt/code-humanizer.git
    cd code-humanizer
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file based on the provided .env.example:

    cp .env.example .env
    
  4. Add your Anthropic API key to the .env file:

    ANTHROPIC_API_KEY=your_anthropic_api_key_here
    

Usage

  1. Start the server:

    npm start
    
  2. For development with auto-restart:

    npm run dev
    
  3. Open your browser and navigate to http://localhost:3000

  4. Paste your TT-NN code, specify the model type, and click "Transform Code"

How It Works

  1. The user inputs compiler-generated TT-NN code and specifies a model type
  2. The application sends the code and model type to the server
  3. The server uses Anthropic's Claude API to analyze and transform the code
  4. Claude applies the following transformations:
    • Renames functions (e.g., ttnn_decorators_ttnn_*ttnn.*)
    • Reorganizes the code structure
    • Renames variables based on their purpose
    • Adds explanatory comments
    • Formats the code for readability
  5. The transformed code is returned to the user interface

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published