|
|
--- |
|
|
license: apache-2.0 |
|
|
tags: |
|
|
- pruned |
|
|
- html |
|
|
- optimized |
|
|
- wanda |
|
|
- activation-pruning |
|
|
base_model: Qwen/Qwen3-4B |
|
|
pipeline_tag: text-generation |
|
|
--- |
|
|
|
|
|
# Qwen3-4B-html-extra-light |
|
|
|
|
|
> π― **HTML-optimized** | π¦ **Extra Light** pruning | β‘ **20% weights pruned** |
|
|
|
|
|
This model is a **minimally pruned** version of [Qwen/Qwen3-4B](https://huggingface.co/Qwen/Qwen3-4B), specialized for **HTML** tasks using activation-aware weight pruning (Wanda-style). |
|
|
|
|
|
## β¨ Key Features |
|
|
|
|
|
- **Specialization**: Optimized for Html tasks |
|
|
- **Pruning Method**: Wanda-style (|W| Γ |activation|) importance scoring |
|
|
- **Size Reduction**: 20% weights pruned |
|
|
- **Use Case**: Highest accuracy retention with slight size reduction |
|
|
|
|
|
## π Performance Comparison |
|
|
|
|
|
| Category | Original | Pruned | Change | |
|
|
|----------|----------|--------|--------| |
|
|
| Python | 20.0% | 80.0% | β 60.0% | |
|
|
| **Html** | 0.0% | 0.0% β | β | |
|
|
| Trivia | 100.0% | 100.0% | β | |
|
|
| Math | 100.0% | 100.0% | β | |
|
|
| Reasoning | N/A | N/A | | |
|
|
| Medical | 100.0% | 100.0% | β | |
|
|
| Linux | 100.0% | 100.0% | β | |
|
|
| Writing | 93.3% | 86.7% | β 6.7% | |
|
|
|
|
|
**Average**: 73.3% β 81.0% (+7.6%) |
|
|
|
|
|
|
|
|
|
|
|
 |
|
|
|
|
|
## π Quick Start |
|
|
|
|
|
```python |
|
|
from transformers import AutoModelForCausalLM, AutoTokenizer |
|
|
|
|
|
model = AutoModelForCausalLM.from_pretrained("CompactAI/Qwen3-4B-html-extra-light") |
|
|
tokenizer = AutoTokenizer.from_pretrained("CompactAI/Qwen3-4B-html-extra-light") |
|
|
|
|
|
# Example usage |
|
|
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 | [Qwen/Qwen3-4B](https://huggingface.co/Qwen/Qwen3-4B) | |
|
|
| Specialization | Html | |
|
|
| Prune Mode | Extra Light | |
|
|
| Pruning Method | Activation-based weight pruning (Wanda) | |
|
|
| Weight Reduction | 20% weights pruned | |
|
|
|
|
|
## π Related Models |
|
|
|
|
|
This model is part of the **Qwen3-4B** pruned model collection. Other variants: |
|
|
- Extra-light (minimal pruning) |
|
|
- Light |
|
|
- Medium-light |
|
|
- Medium |
|
|
- Medium-heavy |
|
|
- Heavy |
|
|
- Extra-heavy (maximum compression) |
|
|
|
|
|
## π License |
|
|
|
|
|
This model inherits the license from the base model [Qwen/Qwen3-4B](https://huggingface.co/Qwen/Qwen3-4B). |
|
|
|
|
|
--- |
|
|
*Generated by ZANNPS [Zeto Automatic Neural Network Pruning System]* |
|
|
|