Back to directory

UPMEM LLM framework for profiling / simulation

A Python library that profiles the execution time of individual PyTorch layers and functions on a CPU, then simulates how those same layers would run and how much energy they would use on a target hardware accelerator profile.

UPMEM LLM framework for profiling / simulation

The library is imported alongside Typer to build a small profiling CLI: a callback initializes the library's profiling options, and profiler_init, profiler_start and profiler_end calls bracket a model's forward pass to record timing. Each layer or function the profiler tracks is identified by four things: its type, such as a Linear module, or the function name such as softmax; the variable name it was assigned to when it was created; its input dimensions; and, for a layer, a unique ID assigned at initialization.

By default the profiler reports a summary of execution time at the end of a run, and when simulating a target hardware accelerator it also reports estimated energy and power consumption, broken down between the summarization or encoding phase and the generation phase; it does not currently track the CPU's real power draw during plain profiling. Usage examples are included for both a custom PyTorch model and a model loaded from Hugging Face.

It is written in Python.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.