Skip to main content

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)

  1. Fragment a model:

    amf fragment --model qwen2.5:0.5b
    
  2. 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:

  1. Universal Parsing: ModelLoader reads formats like GGUF and translates them into a universal tensor abstraction.
  2. Weight Analysis: WeightAnalyzer classifies weights by layer zone, functional role, and computes statistics.
  3. DNA Tagging & Fragmentation: SortingAlgorithm chunks weights into semantic groups (e.g., A-L-003-Q for Attention-Linguistic-Layer3-QBlock).
  4. Intent Analysis: IntentAnalyzer parses user prompts to determine required reasoning/semantic layer zones.
  5. Molecular Orchestration: MolecularEngine triggers selective mmap loading of only the necessary cells into memory.
  6. Dynamic Inference: InferenceEngine executes the forward pass on the loaded functional subset using NumPy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amf_core-0.1.1.tar.gz (39.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amf_core-0.1.1-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

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

Hashes for amf_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 af84aa361aa67e9effb2f7df8c3220a3e740bc3c61e17fbfa50da5a8f50ae206
MD5 603822b24346bdea63464166d3b287a5
BLAKE2b-256 d56d62802fa763b61e67f5b48a3f580b47492a1181c35678f4ad9aa4c14a1121

See more details on using hashes here.

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

Hashes for amf_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d459a765bacfdc9164f8e0996b4574192777f527b890b6fc04f577fb3c55869c
MD5 e18e6845bf8f0ee918831ed204731706
BLAKE2b-256 c43cdc8481c175c3f9663bcdf1ccaa0f95be1a70b4e5c083e7741c4ecba0ee15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page