---
type: "post"
id: "harvard-s-model-carving-cuts-ai-inference-costs-7ff074"
slug: "harvard-s-model-carving-cuts-ai-inference-costs-7ff074"
title: "Harvard's Model Carving Cuts AI Inference Costs by 34% During Pretraining"
description: "Kaden Zheng and Pratyusha Sharma present Model Carving as a way to learn a Transformer’s weights and architecture in one training run (github.com)."
retrieval_nugget: "Kaden Zheng and Pratyusha Sharma present Model Carving as a way to learn a Transformer’s weights and architecture in one training run (github.com)."
published_at: "2026-11-26"
updated_at: "2026-11-26"
record_date: "2026-11-26"
date_kind: "published_at"
topics: ["inference"]
entities: ["Model Carving","Kaden Zheng","Pratyusha Sharma"]
related_patterns: []
novelty_label: "new_fact"
what_changed: "Harvard researchers’ Model Carving method jointly learns Transformer weights and topology, reportedly cutting inference costs by 34% during pretraining."
prior_refs: ["https://newruntime.com/posts/amazon-science-reports-a-method-called-priming-that-c86e28/"]
source_url: "https://github.com/KadenZheng/model-carving"
source_urls: ["https://github.com/KadenZheng/model-carving"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:harvard-s-model-carving-cuts-ai-inference-costs-7ff074"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/harvard-s-model-carving-cuts-ai-inference-costs-7ff074/","markdown":"https://newruntime.com/posts/harvard-s-model-carving-cuts-ai-inference-costs-7ff074.md","json":"https://newruntime.com/posts/harvard-s-model-carving-cuts-ai-inference-costs-7ff074.json"}
markdown_url: "https://newruntime.com/posts/harvard-s-model-carving-cuts-ai-inference-costs-7ff074.md"
---

# Harvard's Model Carving Cuts AI Inference Costs by 34% During Pretraining

## Retrieval answer

Kaden Zheng and Pratyusha Sharma present Model Carving as a way to learn a Transformer’s weights and architecture in one training run (github.com).

## Summary

Kaden Zheng and Pratyusha Sharma present Model Carving as a way to learn a Transformer’s weights and architecture in one training run ([github.com](https://github.com/KadenZheng/model-carving)). Across standard and looped Transformers, they report inference-compute reductions of up to 34% ([kadenzheng.com](https://kadenzheng.com/model-carving)).

## What happened

Model Carving adds gates that scale each sublayer and each connection’s write to the residual stream. A sparsity pressure encourages gates to close; its loss is framed as the compute cost of the extra training tokens that could otherwise be used. When a gate reaches zero, that sublayer is removed from the graph during training. The evaluation covers models up to 2.7B parameters. The public repository includes standard Transformer configurations from 140M to 2.7B and looped configurations from 140M to 1.3B, and says the code was tested with Python 3.11. For a standard 140M starting point, it gives a Carving command, `python train.py configs/standard_140m.yaml --carving`, alongside the dense full-depth baseline, `python train.py configs/standard_140m.yaml`. A Carving run writes `carved.json`, recording retained sublayers and their gates. The repository is public and licensed under MIT.

The researchers also report reduced KV-cache use ([kadenzheng.com](https://kadenzheng.com/model-carving)) and say model quality matched or improved ([kadenzheng.com](https://kadenzheng.com/model-carving)).

## What the archive adds

Unlike approaches that use pretrained weights to change a model’s architecture, Model Carving learns which sublayers to keep during training.

## Why it matters

A pretraining team can use the repository’s paired 140M commands as a starting point for a controlled dense-baseline-versus-Carving run, then inspect `carved.json` to see what the method retained.

## Limits and uncertainty

The headline is an “up to” inference-compute reduction, not a dollar-cost result ([kadenzheng.com](https://kadenzheng.com/model-carving)). The reported evaluation reaches 2.7B parameters, while the package gives no detailed benchmark conditions or numerical quality results to assess the matching-or-improving claim ([kadenzheng.com](https://kadenzheng.com/model-carving)).

## Reader takeaway

Model Carving uses gates to remove Transformer sublayers during training, rather than requiring teams to choose a smaller architecture in advance. The researchers report up to 34% lower inference compute, but the result alone does not establish dollar savings or show how quality and costs compare under a particular workload.

## Open question

Do the reported compute savings persist beyond 2.7B parameters and translate into net training and serving cost savings?

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Inference](https://newruntime.com/topics/inference.md): Explore the inference topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
