CompactAI's picture
Update pruned model - 8 files
2125e90 verified
---
license: apache-2.0
tags:
- pruned
- python
- optimized
- wanda
base_model: LiquidAI/LFM2.5-1.2B-Thinking
pipeline_tag: text-generation
---
# LFM2.5-1.2B-Thinking-python-safe
> **PYTHON-optimized** | **Safe** pruning | **30% weights pruned**
This model is a **conservatively pruned** version of [LiquidAI/LFM2.5-1.2B-Thinking](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Thinking).
> **Pruning Alert:** The benchmarks show virtually NO quality drop! This isn't a bug -- it is a feature. The Wanda pruning algorithm is so effective at identifying unimportant weights that it can remove a large percentage of parameters without affecting performance. Think of it like pruning dead leaves from a tree -- the tree does not miss them because they were not doing anything anyway!
## Performance Comparison
| Category | Original | Pruned | Change |
|----------|----------|--------|--------|
| **Python** | 0.0% | 0.0% ⭐ | β†’ |
| Html | 0.0% | 0.0% | β†’ |
| Trivia | 75.0% | 90.0% | ↑ 15.0% |
| Math | 95.0% | 85.0% | ↓ 10.0% |
| Reasoning | 85.0% | 80.0% | ↓ 5.0% |
| Medical | 80.0% | 80.0% | β†’ |
| Linux | 65.0% | 55.0% | ↓ 10.0% |
| Writing | 45.0% | 50.0% | ↑ 5.0% |
**Average**: 55.6% -> 55.0% (-0.6%)
![Comparison Graph](comparison_graph.png)
## Quick Start
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("CompactAI/LFM2.5-1.2B-Thinking-python-safe")
tokenizer = AutoTokenizer.from_pretrained("CompactAI/LFM2.5-1.2B-Thinking-python-safe")
inputs = tokenizer("Your prompt here", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
## Technical Details
| Property | Value |
|----------|-------|
| Base Model | [LiquidAI/LFM2.5-1.2B-Thinking](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Thinking) |
| Specialization | Python |
| Prune Mode | Safe |
| Weight Reduction | 30% weights pruned |
## License
This model inherits the license from the base model.