Qwen3-4B
Collection
Collection of pruned models based on Qwen/Qwen3-4B
β’
40 items
β’
Updated
π― HTML-optimized | π¦ Medium pruning | β‘ 35% weights pruned
This model is a moderately pruned version of Qwen/Qwen3-4B, specialized for HTML tasks using activation-aware weight pruning (Wanda-style).
| Category | Original | Pruned | Change |
|---|---|---|---|
| Python | 20.0% | 60.0% | β 40.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% | 80.0% | β 13.3% |
Average: 73.3% β 77.1% (+3.8%)
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("CompactAI/Qwen3-4B-html-medium")
tokenizer = AutoTokenizer.from_pretrained("CompactAI/Qwen3-4B-html-medium")
# 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))
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3-4B |
| Specialization | Html |
| Prune Mode | Medium |
| Pruning Method | Activation-based weight pruning (Wanda) |
| Weight Reduction | 35% weights pruned |
This model is part of the Qwen3-4B pruned model collection. Other variants:
This model inherits the license from the base model Qwen/Qwen3-4B.
Generated by ZANNPS [Zeto Automatic Neural Network Pruning System]