Atomic Model Fragmentation (AMF) - Universal LLM Decomposition Library
Project description
Atomic Model Fragmentation (AMF)
المحرك الجزيئي — Molecular Engine
A revolutionary approach to running Large Language Models on resource-constrained hardware by breaking them down into functional, on-demand cells.
Installation
# Clone the repository
cd AI_NEW_GEN
# Install as a library (development mode)
pip install -e .
Quick Start (CLI)
-
Fragment a model:
amf fragment --model qwen2.5:0.5b
-
Start Interactive Engine:
amf chat
Python Library Usage (amf-core)
The AMF system provides a universal Python library abstraction allowing you to easily embed this technology in any Python application.
import amf
# 1. Load Universal Model (GGUF, Safetensors auto-detection)
model = amf.load_universal("/path/to/model.gguf")
# 2. Apply Genetic Fragmentation Strategy
cells = amf.fragment(
model,
strategy="functional",
output_dir="./cells"
)
# 3. Explore Cellular DNA
for cell in cells.cells:
print(f"Cell ID: {cell.cell_id}")
print(f"DNA Tag: {cell.dna_tag}")
print(f"Size: {cell.size_mb:.1f} MB")
System Architecture
AMF operates in 6 distinct phases:
- Universal Parsing:
ModelLoaderreads formats like GGUF and translates them into a universal tensor abstraction. - Weight Analysis:
WeightAnalyzerclassifies weights by layer zone, functional role, and computes statistics. - DNA Tagging & Fragmentation:
SortingAlgorithmchunks weights into semantic groups (e.g.,A-L-003-Qfor Attention-Linguistic-Layer3-QBlock). - Intent Analysis:
IntentAnalyzerparses user prompts to determine required reasoning/semantic layer zones. - Molecular Orchestration:
MolecularEnginetriggers selectivemmaploading of only the necessary cells into memory. - Dynamic Inference:
InferenceEngineexecutes the forward pass on the loaded functional subset using NumPy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amf_core-0.1.1.tar.gz.
File metadata
- Download URL: amf_core-0.1.1.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af84aa361aa67e9effb2f7df8c3220a3e740bc3c61e17fbfa50da5a8f50ae206
|
|
| MD5 |
603822b24346bdea63464166d3b287a5
|
|
| BLAKE2b-256 |
d56d62802fa763b61e67f5b48a3f580b47492a1181c35678f4ad9aa4c14a1121
|
File details
Details for the file amf_core-0.1.1-py3-none-any.whl.
File metadata
- Download URL: amf_core-0.1.1-py3-none-any.whl
- Upload date:
- Size: 45.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d459a765bacfdc9164f8e0996b4574192777f527b890b6fc04f577fb3c55869c
|
|
| MD5 |
e18e6845bf8f0ee918831ed204731706
|
|
| BLAKE2b-256 |
c43cdc8481c175c3f9663bcdf1ccaa0f95be1a70b4e5c083e7741c4ecba0ee15
|