{"id":45619397,"url":"https://github.com/anthony-maio/fitcheck","last_synced_at":"2026-02-23T18:29:29.481Z","repository":{"id":338110718,"uuid":"1156564576","full_name":"anthony-maio/fitcheck","owner":"anthony-maio","description":"Know before you train — VRAM estimation for LLM fine-tuning.","archived":false,"fork":false,"pushed_at":"2026-02-14T09:30:12.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-14T15:45:59.685Z","etag":null,"topics":["fine-tuning-llm","gpu","training","vram-optimization"],"latest_commit_sha":null,"homepage":"https://making-minds.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anthony-maio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-12T19:45:57.000Z","updated_at":"2026-02-14T09:31:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/anthony-maio/fitcheck","commit_stats":null,"previous_names":["anthony-maio/aegis-ml","anthony-maio/fitcheck"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/anthony-maio/fitcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-maio%2Ffitcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-maio%2Ffitcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-maio%2Ffitcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-maio%2Ffitcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthony-maio","download_url":"https://codeload.github.com/anthony-maio/fitcheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthony-maio%2Ffitcheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29750528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fine-tuning-llm","gpu","training","vram-optimization"],"created_at":"2026-02-23T18:29:28.880Z","updated_at":"2026-02-23T18:29:29.471Z","avatar_url":"https://github.com/anthony-maio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fitcheck\n\n\u003e **Know before you train** — VRAM estimation for LLM fine-tuning.\n\nfitcheck predicts GPU memory usage from first principles. Given a model, GPU, and training method, it tells you whether your config will fit — before you spend an hour discovering it won't.\n\n## Why fitcheck?\n\nFine-tuning LLMs means guessing at batch sizes and hoping you don't OOM. The feedback loop is brutal: pick a config, wait for the run to start, crash 2 minutes in, adjust, repeat.\n\nfitcheck collapses that loop. It computes each VRAM component — model weights, optimizer states, gradients, activations, the logits buffer, eval KV-cache spikes — and produces a breakdown with confidence bounds.\n\n## What it computes\n\n| Component | What it is | Why it matters |\n|-----------|-----------|----------------|\n| **Model weights** | Base params in training dtype (bf16/NF4) | 4.2 GB for QLoRA 8B, 16 GB for full bf16 |\n| **Optimizer states** | AdamW momentum + variance per trainable param | Dominates full fine-tune (~60 GB for 8B) |\n| **Gradients** | One gradient per trainable param | Small for LoRA, huge for full FT |\n| **Activations** | Per-layer stored tensors for backward pass | Flash-attention-aware, scales with batch × seq |\n| **Logits buffer** | batch × seq × vocab × 4 bytes (float32) | The surprise OOM — 2 GB at bs=4 with 128k vocab |\n| **Eval KV-cache** | Spike during evaluation steps | Can exceed training steady-state |\n\n## Quick Start\n\n```bash\npip install -r requirements.txt\n\n# Run tests\npytest\n```\n\n```python\nfrom fitcheck.hub.resolver import resolve_from_config\nfrom fitcheck.hardware.registry import get_hardware\nfrom fitcheck.profilers.vram.engine import VRAMEstimator\nfrom fitcheck.models.profiles import TrainingMethod, LoRAConfig\n\n# QLoRA Llama 8B on an RTX 3090\nestimator = VRAMEstimator()\nbreakdown = estimator.estimate(\n    model=resolve_from_config(\"meta-llama/Llama-3.1-8B\", config),\n    hardware=get_hardware(\"3090\"),\n    method=TrainingMethod.QLORA,\n    batch_size=4,\n    seq_len=1024,\n    lora_config=LoRAConfig(rank=16),\n)\n\nprint(f\"Steady-state: {breakdown.steady_state_gb:.1f} GB\")\nprint(f\"Usable VRAM:  {get_hardware('3090').usable_vram_gb} GB\")\n# Steady-state: 16.6 GB\n# Usable VRAM:  22.8 GB  ← fits with 6 GB headroom\n```\n\n## Development\n\n```bash\npytest                                              # Run all tests (51)\npytest tests/fitcheck/profilers/test_estimator.py -v  # End-to-end estimator tests\nruff format fitcheck tests                          # Format code\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthony-maio%2Ffitcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthony-maio%2Ffitcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthony-maio%2Ffitcheck/lists"}