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.0.tar.gz (39.9 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.0-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

Details for the file amf_core-0.1.0.tar.gz.

File metadata

  • Download URL: amf_core-0.1.0.tar.gz
  • Upload date:
  • Size: 39.9 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.0.tar.gz
Algorithm Hash digest
SHA256 1d373759aa6668f520170c6f1b77d6dd0aae938ab51f6b6f227e711ff60f21ff
MD5 977cbc0b25c24d9abd3b78776dcef457
BLAKE2b-256 f142211648060056841073716a9823adca79ba368ddd1bc9b41254fcd561dcc8

See more details on using hashes here.

File details

Details for the file amf_core-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: amf_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 45.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcebcbeb32af7f3b83deed741758bf81f2d02a3584a97b4511a0c041d11e2fb0
MD5 f9dc3e4058c11334d8614b7da9d2579a
BLAKE2b-256 db84428768e2f51706431196872b9ac22ba326678e6bf01af4cf851d7381b358

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