CompactAI's picture
Upload folder using huggingface_hub
6fdf1f8 verified
---
license: apache-2.0
tags:
- pruned
- python
- optimized
- wanda
base_model: google/gemma-3-270m
pipeline_tag: text-generation
---
# gemma-3-270m-python-safe
> 🎯 **PYTHON-optimized** | πŸ“¦ **Safe** pruning | ⚑ **1% weights pruned**
This model is a **conservatively pruned** version of [google/gemma-3-270m](https://huggingface.co/google/gemma-3-270m).
**Community-requested model.**
## Performance Comparison
| Category | Original | Pruned | Change |
|----------|----------|--------|--------|
| **Python** | 0.0% | 0.0% ⭐ | β†’ |
| Html | 0.0% | 0.0% | β†’ |
| Trivia | 0.0% | 0.0% | β†’ |
| Math | 0.0% | 0.0% | β†’ |
| Reasoning | 0.0% | 0.0% | β†’ |
| Medical | 0.0% | 0.0% | β†’ |
| Linux | 0.0% | 0.0% | β†’ |
| Writing | 0.0% | 0.0% | β†’ |
**Average**: 0.0% β†’ 0.0% (+0.0%)
![Comparison Graph](comparison_graph.png)
## Quick Start
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("CompactAI/gemma-3-270m-python-safe")
tokenizer = AutoTokenizer.from_pretrained("CompactAI/gemma-3-270m-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 | [google/gemma-3-270m](https://huggingface.co/google/gemma-3-270m) |
| Specialization | Python |
| Prune Mode | Safe |
| Weight Reduction | 1% weights pruned |
## License
This model inherits the license from the base model.