oopere's picture
Upload 11 files
cb7223a verified

A newer version of the Gradio SDK is available: 5.33.1

Upgrade
metadata
title: OptiPFair Bias Visualization Tool
emoji: πŸ”
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.29.1
app_file: app.py
pinned: false
license: apache-2.0

πŸ” OptiPFair Bias Visualization Tool

Analyze potential biases in Large Language Models using advanced visualization techniques.

🎯 Features

  • PCA Analysis: Visualize how model representations differ between prompt pairs in 2D space
  • Mean Difference: Compare average activation differences across all layers
  • Heatmap: Detailed visualization of activation patterns in specific layers
  • Model Support: Compatible with LLaMA, Gemma, Qwen, and custom HuggingFace models
  • Predefined Scenarios: Ready-to-use bias testing scenarios for racial bias analysis

πŸš€ How to Use

  1. Check Backend Status: Verify the system is ready
  2. Select Model: Choose from predefined models or specify a custom HuggingFace model
  3. Choose Analysis Type: Pick PCA, Mean Difference, or Heatmap visualization
  4. Configure Parameters: Select scenarios, component types, and layer numbers
  5. Generate Visualization: Click generate and download results

πŸ“š Resources

πŸ€– For Developers

πŸ€– For Developers

Want to integrate OptipFair in your own projects? Check out the LLM Reference Manual.

  • Just give the LLM Reference Manual to your favourite LLM and start working with optipfair.

Built with ❀️ using OptipFair library.