A newer version of the Streamlit SDK is available:
1.46.1
metadata
title: fbaldassarri Repository Eval
emoji: π»
colorFrom: indigo
colorTo: green
sdk: streamlit
sdk_version: 1.44.1
app_file: app.py
pinned: true
license: apache-2.0
short_description: Evaluation space for fbaldassarri Repository
fbaldassarri Model Comparison Tool
π Features
- Model Discovery: Automatically finds all quantized models in your HuggingFace account
- Smart Filtering: Filter models by quantization method, base model, or custom text
- Detailed Metadata Analysis: Compare model architectures, sizes, and quantization details
- Repository Statistics: Track downloads, likes, and update frequency
- Interactive Visualizations: Multiple charts and graphs for performance analysis
- Selective Comparison: Use
.modelsignore
to exclude irrelevant models - CPU-Optimized: Works perfectly on free tier HuggingFace Spaces without GPU
- Export Capabilities: Download comparison results as CSV for further analysis
π Usage Instructions
Basic Usage
- Enter your HuggingFace username
- The tool will automatically discover all your quantized models
- Use the filters to select models by quantization method or base model
- Click "Run Comparison" to analyze the selected models
- View the results in the "Model Comparison", "Model Details", and "Visualizations" tabs
Advanced Features
Filtering Models
- Quantization Method: Select specific quantization methods (Intel AutoRound, AutoGPTQ, AutoAWQ)
- Base Model: Compare models derived from the same base architecture
- Text Filter: Find models containing specific text in their names
Using .modelsignore
Create a .modelsignore
file in the same directory as app.py
to exclude specific models from discovery:
# Comments start with #
fbaldassarri/llama-2-7b-* # Ignores all llama-2-7b models
*mistral* # Ignores anything with "mistral" in the name
fbaldassarri/exact-model-name # Ignores a specific model
Supports wildcards and exact matching patterns.
Comparison Methods
Two comparison methods are available:
- Metadata Comparison Only: Fast analysis of model metadata and architecture
- Metadata + Estimated Size: Additionally calculates the disk size of each model
π Visualization Types
The tool provides multiple visualization options:
1. Quantization Methods
- Distribution of quantization methods (pie chart)
- Distribution of precision formats (bar chart)
- Distribution of group sizes (bar chart)
2. Model Architecture
- Model size comparison (bar chart)
- Layer count comparison (bar chart)
- Hidden size comparison (bar chart)
- Attention heads comparison (bar chart)
3. Repository Statistics
- Downloads comparison (bar chart)
- Likes comparison (bar chart)
- Days since update comparison (bar chart)
π§ Technical Details
Supported Quantization Methods
The tool is designed to detect and analyze:
- Intel AutoRound: Intel's quantization solution
- AutoGPTQ: Automatic GPTQ quantization
- AutoAWQ: Activation-aware weight quantization
Metadata Extraction
For each model, the tool extracts:
- Quantization method (based on name and tags)
- Precision (INT4, INT8, FP16, FP32)
- Group size (e.g., gs128)
- Base model architecture
- Hidden size and layer count
- Attention head count
- Maximum sequence length
Size Estimation
When the "Metadata + Estimated Size" option is selected, the tool:
- Fetches the list of model files from the repository
- Identifies
.bin
and.safetensors
files - Calculates their total size in GB
This avoids downloading the actual model weights, making it CPU-friendly.
π Example Use Cases
- Comparing Quantization Methods: Determine which method (AutoGPTQ vs AutoAWQ) produces smaller models
- Quantization Parameter Analysis: See how different group sizes affect model size
- Popularity Tracking: Identify which of your quantized models has the most downloads
- Architecture Analysis: Compare hidden sizes and layer counts across different quantized variants
β οΈ Troubleshooting
Common Issues
- Slow Model Discovery
- The tool may take time to discover models if you have many repositories
- Use the
.modelsignore
file to exclude irrelevant models and speed up discovery
- Memory Issues
- The application is optimized for CPU usage, but comparing many models simultaneously may cause memory pressure
- Use the "Maximum models to compare" slider to limit the number of models
- Error: "Cannot subtract tz-naive and tz-aware datetime-like objects"
- This error has been fixed in the latest version
- Update to the latest version if you encounter it
- Missing Model Information
- Some information may be unavailable if models don't have standard config files
- The tool will show "Unknown" for fields it couldn't extract
π Requirements
- Python 3.9+
- huggingface_hub
- streamlit
- pandas
- plotly
- numpy
See requirements.txt
for a complete list of dependencies.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgements
- HuggingFace for the Hub API and Spaces platform
- The developers of AutoGPTQ, AutoAWQ, and Intel AutoRound
- Streamlit for the interactive web framework
π€ Author
Created by Francesco Baldassarri
π€ Contributing
Contributions, issues, and feature requests are welcome!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request