Llama-3.2-1B-ConnectomePruned - LLM pruning using drosophila brain rules
2 min read
The model generates conversational text, helps with Python coding, and answers scientific questions based on LLaMA-3.2-1B-Instruct (1.24B parameters). The author - Rüzgar Vatansever - applied pruning (removing part of the model's weights and connections to make it lighter), inspired by the connectome (neural connection map) of the adult fruit fly Drosophila melanogaster. Unlike standard compression, this approach protects key nodes by analogy with Drosophila Central Complex Hub Protection and uses homeostatic synapse scaling (balancing connection activity). It is suitable for developers and enthusiasts interested in experimental LLM sparsification methods and lightweight models for local tasks.
Key features
- A 27.10% reduction in linear parameters - 263,672,581 weights removed (from 973,078,528 to 709,405,947).
- The method relies on Drosophila melanogaster brain connectivity rules from a Nature study (2024) and the Unsloth version of LLaMA-3.2-1B-Instruct.
- Fast post-training: the pruning procedure itself took 29.08 seconds.
- Card benchmarks maintain Python syntax and Rayleigh scattering explanation accuracy on par with the base model.
What you can do
- Run a lightweight conversational or coding assistant based on LLaMA-3.2-1B-Instruct with fewer linear parameters.
- Compare behavior and inference speed after ConnectomePrune against the original model on simple generation tasks and Python scripts.
- Explore the code and methodology in the linked connectome-prune-llm repository and Zenodo preprint for your own compression experiments.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "RuzgarVatansever/Llama-3.2-1B-ConnectomePruned"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")Read more
DetailsLinear parameters: 709,405,947 instead of 973,078,528 (-263,672,581, 27.10% linear parameter reduction).
Pruning time: 29.08 s; in the 15x14 arithmetic test, 194.3 ms/tok is specified versus 1698.4 ms/tok for the base model.
Declared languages in metadata: en, tr; exact VRAM requirements are not specified in the card.










Comments