SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1711.02613 · 2017

Moonshine: Distilling with Cheap Convolutions

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1711.02613.json · badge: /api/ran/1711.02613.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
BayesWatch/pytorch-moonshine canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
at Ran
ran, honoured the contract we drafted
BayesWatch/pytorch-moonshine/funcs.py
code served (permissive licence) · get_code("7556a5bddc992e63")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# The function `at` takes a single parameter `x`
# It calls: x.pow(2), .mean(1), .view(x.size(0), -1), and F.normalize()
# So x must be a tensor with at least 2 dimensions

# Create a small tensor: batch_size=2, with shape (2, 4, 3)
# This allows mean(1) to work on dimension 1, and view to reshape properly
x = torch.randn(2, 4, 3)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
at_loss Ran
ran, honoured the contract we drafted
BayesWatch/pytorch-moonshine/funcs.py
code served (permissive licence) · get_code("9620e20bbcbbb1d0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create two small tensors with distinct dimensions
# x: (batch=2, channels=4, height=3, width=5) - 4D tensor for conv-like input
# y: (batch=2, channels=4, height=3, width=5) - same shape as x
x = torch.randn(2, 4, 3, 5)
y = torch.randn(2, 4, 3, 5)

ARGS = {
    "x": x,
    "y": y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
distillation Ran
ran, violated the contract we drafted
BayesWatch/pytorch-moonshine/funcs.py
code served (permissive licence) · get_code("f6484efda3ef4ceb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the distillation function
batch_size = 2
num_classes = 4

# y: student model logits (batch_size, num_classes)
y = torch.randn(batch_size, num_classes)

# teacher_scores: teacher model logits (batch_size, num_classes)
teacher_scores = torch.randn(batch_size, num_classes)

# labels: ground truth class indices (batch_size,)
labels = torch.tensor([0, 2])

# T: temperature parameter (scalar)
T = 4.0

# alpha: weighting parameter between distillation and cross-entropy (scalar)
alpha = 0.7

ARGS = {
    "y": y,
    "teacher_scores": teacher_scores,
    "labels": labels,
    "T": T,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_num_gen Ran
ran, honoured the contract we drafted
BayesWatch/pytorch-moonshine/count_flops.py
code served (permissive licence) · get_code("76cc74efee42ba21")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

def simple_generator():
    """A simple generator that yields a few items"""
    yield 1
    yield 2
    yield 3
    yield 4
    yield 5

ARGS = {
    "gen": simple_generator()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_leaf Ran
ran, violated the contract we drafted
BayesWatch/pytorch-moonshine/count_flops.py
code served (permissive licence) · get_code("26ff085b343fa39e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function is_leaf checks if a model has no children by calling model.children()
# We need to create a valid nn.Module instance

# Create a leaf model (no children)
leaf_model = nn.Linear(4, 3)

# Create a non-leaf model (has children) for comparison if needed
parent_model = nn.Sequential(
    nn.Linear(4, 3),
    nn.ReLU()
)

# The function only uses model.children(), so any nn.Module works
# Let's use a leaf model as the test case
ARGS = {
    "model": leaf_model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_pruned Ran
ran, violated the contract we drafted
BayesWatch/pytorch-moonshine/count_flops.py
code served (permissive licence) · get_code("5c4dab079bf6276e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a pruned layer (has mask attribute)
class PrunedLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
        self.mask = torch.ones(4, 3)

# Create an unpruned layer (no mask attribute)
class UnprunedLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)

# Test with pruned layer
pruned_layer = PrunedLayer()

ARGS = {
    "layer": pruned_layer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ACDC Not yet run
unverified (harvested, no recorded run)
BayesWatch/pytorch-moonshine/models/blocks.py
code served (permissive licence) · get_code("5115f85144261493")
How it ran

no invocation recorded.

conv_function Not yet run
unverified (harvested, no recorded run)
BayesWatch/pytorch-moonshine/models/blocks.py
code served (permissive licence) · get_code("dfeb82e670f646bf")
How it ran

no invocation recorded.

parse_options Not yet run
unverified (harvested, no recorded run)
BayesWatch/pytorch-moonshine/models/wide_resnet.py
code served (permissive licence) · get_code("88983196c12d6ae2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 6 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 6 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
is_leaf 7 other papers
1 dated earlier, 6 later
1703.09844 (2017-03)
Multi-Scale Dense Networks for Resource Efficient Image Classification
1904.12368 (2019-04)
Towards Efficient Model Compression via Learned Global Ranking
2007.04242 (2020-07)
Dynamic Group Convolution for Accelerating Convolutional Neural Networks
and 4 more not named here
get_num_gen 6 other papers
1 dated earlier, 5 later
1703.09844 (2017-03)
Multi-Scale Dense Networks for Resource Efficient Image Classification
1904.12368 (2019-04)
Towards Efficient Model Compression via Learned Global Ranking
2007.04242 (2020-07)
Dynamic Group Convolution for Accelerating Convolutional Neural Networks
and 3 more not named here
at 2 other papers
2 later
1906.04113 (2019-06)
BlockSwap: Fisher-guided Block Substitution for Network Compression on a Budget
2401.14948 (2024-01)
Conserve-Update-Revise to Cure Generalization and Robustness Trade-off in Adversarial Training
at_loss 1 other paper
1 later
1906.04113 (2019-06)
BlockSwap: Fisher-guided Block Substitution for Network Compression on a Budget
distillation 1 other paper
1 later
1906.04113 (2019-06)
BlockSwap: Fisher-guided Block Substitution for Network Compression on a Budget
is_pruned 1 other paper
1 later
2105.03193 (2021-05)
Network Pruning That Matters: A Case Study on Retraining Variants

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Many engineers wish to deploy modern neural networks in memory-limited settings; but the development of flexible methods for reducing memory use is in its infancy, and there is little knowledge of the resulting cost-benefit. We propose structural model distillation for memory reduction using a strategy that produces a student architecture that is a simple transformation of the teacher architecture: no redesign is needed, and the same hyperparameters can be used. Using attention transfer, we provide Pareto curves/tables for distillation of residual networks with four benchmark datasets, indicating the memory versus accuracy payoff. We show that substantial memory savings are possible with very little loss of accuracy, and confirm that distillation provides student network performance that is better than training that student architecture directly on data.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1711.02613")
get_code_for_paper("1711.02613")
have("1711.02613")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1711.02613.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1711.02613.svg)](https://syntology.ai/paper/1711.02613)

Connect an agent — have() is free.