ModelDiff

User Guide

How to Use ModelDiff

Step 1: Load Models

Drag and drop two model files (.gguf or .safetensors) into the side-by-side drop zones. Or click the zones to browse for files.

Note: ModelDiff only reads the file headers. Even 100GB+ files parse in seconds because we never load the actual tensor data.

Step 2: Compare

Click the "Compare Models" button. ModelDiff will analyze the differences and show you a detailed report.

Step 3: Explore Results

The report has 4 tabs:

What Are GGUF and SafeTensors?

GGUF

GGUF (GPT-Generated Unified Format) is a binary format used by llama.cpp, ollama, and other C/C++ LLM tools. It stores model weights, metadata (architecture, parameters, etc.), and tensor info in a compact binary structure.

Common use: Quantized models (Q4_K_M, Q5_K_S, etc.) for efficient inference.

SafeTensors

SafeTensors is a simple, safe format developed by HuggingFace. It stores tensors with a JSON header describing their shapes and data types. It's designed to prevent arbitrary code execution and is easier to parse than pickle-based formats.

Common use: Fine-tuned models from HuggingFace, often in F16 or F32 precision.

Use Cases

1. Comparing Quantizations

You have model-f16.gguf and model-q4_k_m.gguf. Use ModelDiff to verify:

2. Checking Fine-Tune Changes

You fine-tuned a model. Compare the base and fine-tuned versions to see:

3. Verifying Merges

You merged two models. Compare the merged result with the originals to confirm:

4. Cross-Format Conversion

You converted a SafeTensors model to GGUF. Use ModelDiff to check:

Tips

Performance

Filters

Charts

FAQ

Q: Can I compare two SafeTensors files?

Yes! ModelDiff supports GGUF-GGUF, SafeTensors-SafeTensors, and GGUF-SafeTensors comparisons.

Q: Why does it say "Metadata Diff only available for GGUF files"?

SafeTensors has minimal metadata (usually just format type). GGUF stores rich metadata (architecture, vocab size, etc.). The Metadata Diff tab only works when at least one model is GGUF.

Q: Do I need to upload my files?

No. Everything happens in your browser. Your files never leave your device.

Q: Can I use ModelDiff offline?

Yes, once the page loads. The only external dependency is ECharts (loaded from CDN), but modern browsers cache it.

Q: What if tensor names don't match?

ModelDiff matches tensors by exact name. If you're comparing GGUF vs SafeTensors and names differ (e.g., "blk.0.attn_q.weight" vs "model.layers.0.self_attn.q_proj.weight"), they'll show as added/removed rather than matched. This is expected for cross-format conversions.

Troubleshooting

Parse Error

If you see "Invalid GGUF magic number" or similar:

Browser Compatibility

ModelDiff uses modern JavaScript (File.slice, DataView, TextDecoder). Works in:

Contact

Need help? Found a bug? Email nullkit.dev@outlook.com.

← Back to ModelDiff