# Model Refactoring for Software Engineers

Version 0.1, 24 September 2026.

Read `Model_Refactoring_for_Software_Engineers_Final.md` first. The manuscript covers profiling, evaluation, structural pruning, distillation, quantization, image and video diffusion, and deployment.

## What was tested

The package contains a trained synthetic classifier experiment and small mechanism tests for convolution, attention, and chunking. The evidence directory contains original recorded outputs, raw timing samples, and generated checkpoints. It does not contain pretrained diffusion, speech, or language weights.

No Android, GPU, NPU, or production media-quality benchmark was run. ONNX export and quantization templates were not executed. Proposed recipes must be adapted and validated before production use.

## Run

Use Python 3.13.5 and the appropriate PyTorch 2.10.0 build to approximate the recorded environment. See Appendix A for installation limitations and the complete instructions.

```bash
python code/lab.py --self-test
python code/chunking.py
python code/vision_attention_lab.py --out vision_attention_rerun.json
python code/lab.py --out new_run
```

Use a new directory for each learning run. Do not overwrite the supplied evidence. Only load checkpoint files from sources you trust.

## Integrity

`SHA256SUMS.txt` lists package file digests. These detect accidental changes relative to this package; they are not a signature or a guarantee of origin. The original experiment records separately identify the code and checkpoint digests used in those runs.

The manifest was regenerated for publication so that it covers every file shipped here, including the manuscript and the PDF. The earlier manifest is preserved unchanged as `SHA256SUMS.original.txt`; it covers the code and evidence but references the manuscript under its former filename. Verify this package with:

```bash
sha256sum -c SHA256SUMS.txt
```
