SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.10209 · ICML · 2025

EFFICODER: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning

Jie Zhang, Dong Huang, Zhijiang Guo, Yuhao Qing, Heming Cui, Jianbo Dai, Han Weng, Guangtao Zeng, Meng Luo

arXiv · PDF · Open in the Atlas

Code that ran

15 of 15 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; 9 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 0 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/2410.10209.json · badge: /api/ran/2410.10209.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
huangd1999/EffiCoder canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
huangd1999/efficoder canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
huangd1999/effi-code canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_memory_usage Ran
ran, honoured the contract we drafted
huangd1999/efficoder/src/calculate_memory_usage.py
code served (permissive licence) · get_code("30cacc028a74fbaa")
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 float, 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 tempfile
import os

# Create a temporary dat file with memory profiling data
temp_dir = tempfile.mkdtemp()
dat_file_path = os.path.join(temp_dir, "memory_profile.dat")

# Write sample memory profiling data
with open(dat_file_path, 'w') as f:
    # Header line
    f.write("Filename:Function:Line # Mem usage    Timestamp (s)\n")
    # Data lines with format: filename:function:line mem_in_mb timestamp
    f.write("script.py:function1:10 50.5 1.0\n")
    f.write("script.py:function2:20 55.3 2.5\n")
    f.write("script.py:function3:30 60.1 4.0\n")
    f.write("__main__.main:40 65.2 5.5\n")
    f.write("script.py:function4:50 58.7 7.0\n")

ARGS = {
    "dat_file_path": dat_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
calculate_memory_usage Ran
ran, honoured the contract we drafted
huangd1999/EffiCoder/src/calculate_memory_usage.py
code served (permissive licence) · get_code("d55a48418c812b09")
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 float, 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 tempfile
import os

# Create a temporary file with memory profiling data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.dat')
temp_file_path = temp_file.name

# Write header
temp_file.write("timestamp memory_mb time\n")

# Write sample memory profiling data
# Format: function_name memory_mb timestamp
temp_file.write("function_a 100.5 1.0\n")
temp_file.write("function_b 105.2 2.0\n")
temp_file.write("function_c 110.8 3.5\n")
temp_file.write("function_d 108.3 5.0\n")
temp_file.write("__main__.some_func 112.1 6.5\n")  # This should be skipped
temp_file.write("function_e 115.6 8.0\n")

temp_file.close()

ARGS = {
    'dat_file_path': temp_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
calculate_memory_usage Ran
ran, honoured the contract we drafted
huangd1999/effi-code/src/code_efficiency_calculator.py
code served (permissive licence) · get_code("f21888a0452d23f3")
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 float, 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 tempfile
import os

# Create a temporary file with memory profiling data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.dat')
temp_file.write("TIMESTAMP MEM_MB TIME\n")
temp_file.write("MEM 100.5 1.0\n")
temp_file.write("MEM 105.2 2.0\n")
temp_file.write("MEM 110.8 3.5\n")
temp_file.write("MEM 108.3 4.0\n")
temp_file.close()

dat_file_path = temp_file.name

ARGS = {
    'dat_file_path': dat_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
calculate_runtime Ran
ran, honoured the contract we drafted
huangd1999/efficoder/src/calculate_memory_usage.py
code served (permissive licence) · get_code("85a375e19202d112")
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 float, 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 tempfile
import os

# Create a temporary .dat file with the expected format
temp_dir = tempfile.mkdtemp()
dat_file_path = os.path.join(temp_dir, "test.dat")

# Write a sample .dat file with header and data lines
with open(dat_file_path, 'w') as f:
    f.write("header line\n")
    f.write("some_func 0 1.0 extra data\n")
    f.write("__main__. 0 1.5 should be skipped\n")
    f.write("another_func 0 2.5 more data\n")
    f.write("yet_another 0 3.2 final data\n")

ARGS = {
    "dat_file_path": dat_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
calculate_runtime Ran
ran, honoured the contract we drafted
huangd1999/EffiCoder/src/calculate_memory_usage.py
code served (permissive licence) · get_code("6cf2449e22e03c59")
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 float, 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 tempfile
import os

# Create a temporary .dat file with the expected format
# The function expects lines with timestamps in the 3rd column (index 2)
# and skips lines containing '__main__.'

temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.dat', delete=False)
temp_file_path = temp_file.name

# Write header line
temp_file.write("header line\n")

# Write data lines with timestamps
# Format: some_data some_data timestamp other_data
temp_file.write("data1 data1 1.5 extra\n")
temp_file.write("data2 data2 2.3 extra\n")
temp_file.write("data3 data3 1.8 extra\n")
temp_file.write("__main__. data4 3.0 extra\n")  # This line will be skipped
temp_file.write("data5 data5 2.1 extra\n")

temp_file.close()

ARGS = {
    'dat_file_path': temp_file_path
}

# Clean up will happen when the temp file is garbage collected or manually deleted
# For testing, the file persists during execution
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
calculate_runtime Ran
ran, honoured the contract we drafted
huangd1999/effi-code/src/code_efficiency_calculator.py
code served (permissive licence) · get_code("952b9c9886c64735")
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 float, 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 tempfile
import os

# Create a temporary .dat file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.dat', delete=False)

# Write header line
temp_file.write('HEADER\n')

# Write some MEM lines with timestamps
temp_file.write('MEM value 1.5 other\n')
temp_file.write('MEM value 2.3 other\n')
temp_file.write('MEM value 3.7 other\n')
temp_file.write('OTHER value 4.0 data\n')
temp_file.write('MEM value 5.2 other\n')

temp_file.close()

dat_file_path = temp_file.name

ARGS = {
    'dat_file_path': dat_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
construct_prompt_template Ran
ran; our contract draft was wrong, not the code
huangd1999/EffiCoder/src/vllm_effibench.py
code served (permissive licence) · get_code("0e96c7909015edc3")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 mock LLM that has a generate method
class MockLLM:
    def generate(self, inputs, sampling_params):
        # Return a list of mock output objects
        outputs = []
        for i in range(len(inputs)):
            mock_output = MockGenerateOutput()
            outputs.append(mock_output)
        return outputs

class MockGenerateOutput:
    def __init__(self):
        self.outputs = [MockTextOutput()]

class MockTextOutput:
    def __init__(self):
        self.text = "Generated text sample"

# Create mock inputs (list of strings or prompts)
inputs = [
    "What is the capital of France?",
    "Explain machine learning in one sentence."
]

# Create mock LLM instance
llm = MockLLM()

# Create mock sampling params (can be a dict or simple object)
sampling_params = {
    "temperature": 0.7,
    "max_tokens": 100,
    "top_p": 0.9
}

ARGS = {
    "inputs": inputs,
    "llm": llm,
    "sampling_params": sampling_params
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
create_score_evaluation_response Ran
ran on a synthesized input
huangd1999/EffiCoder/LLaMA-Factory/src/llamafactory/api/chat.py
code served (permissive licence) · get_code("f31c69421a40b0a4")
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 coroutine. The image it ran in was not recorded. If your copy returns the same type 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 uuid
from typing import List, Optional

torch.manual_seed(0)

# Stand-in classes for the types used in the function
class Message:
    def __init__(self, role: str, content: str):
        self.role = role
        self.content = content

class ScoreEvaluationRequest:
    def __init__(self, messages: List[Message], max_length: int, model: str):
        self.messages = messages
        self.max_length = max_length
        self.model = model

class ScoreEvaluationResponse:
    def __init__(self, id: str, model: str, scores: List[float]):
        self.id = id
        self.model = model
        self.scores = scores

class ChatModel:
    async def aget_scores(self, messages: List[Message], max_length: int) -> List[float]:
        # Return dummy scores based on number of messages
        return [0.5 + 0.1 * i for i in range(len(messages))]

# Construct request with valid messages (non-empty list)
messages = [
    Message(role="user", content="Hello"),
    Message(role="assistant", content="Hi there"),
]

request = ScoreEvaluationRequest(
    messages=messages,
    max_length=512,
    model="gpt-4"
)

# Construct chat model
chat_model = ChatModel()

# Define ARGS dictionary
ARGS = {
    "request": request,
    "chat_model": chat_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 coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
dictify Ran
ran; our contract draft was wrong, not the code
huangd1999/EffiCoder/LLaMA-Factory/src/llamafactory/api/common.py
code served (permissive licence) · get_code("87aa9acaa81294f5")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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
from pydantic import BaseModel

class SampleModel(BaseModel):
    name: str
    value: int
    data: list

# Create a valid Pydantic BaseModel instance
sample_data = SampleModel(name="test", value=42, data=[1, 2, 3])

ARGS = {
    "data": sample_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
fetch_completion Ran
ran; our contract draft was wrong, not the code
huangd1999/EffiCoder/src/vllm_effibench.py
code served (permissive licence) · get_code("d894dbc6e01098e7")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

class MockOutput:
    def __init__(self, text):
        self.text = text

class MockSequenceOutput:
    def __init__(self, text):
        self.outputs = [MockOutput(text)]

class MockLLM:
    def generate(self, inputs, sampling_params):
        outputs = []
        for input_text in inputs:
            text = "def completed_function():\n    return 42"
            outputs.append(MockSequenceOutput(text))
        return outputs

data_entry_lists = [
    {
        'prompt': 'def incomplete_function():\n    x = 1\n    y = 2\n    return'
    },
    {
        'prompt': 'def another_function(a, b):\n    result = a +'
    }
]

llm = MockLLM()

sampling_params = {
    'temperature': 0.7,
    'max_tokens': 256,
    'top_p': 0.9
}

ARGS = {
    'data_entry_lists': data_entry_lists,
    'llm': llm,
    'sampling_params': sampling_params
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
fetch_completion Ran
ran; our contract draft was wrong, not the code
huangd1999/EffiCoder/src/vllm_humaneval.py
code served (permissive licence) · get_code("269e7926aa875e76")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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


class MockOutput:
    def __init__(self, text):
        self.text = text


class MockGenerationResult:
    def __init__(self, text):
        self.outputs = [MockOutput(text)]


class MockLLM:
    def generate(self, inputs, sampling_params):
        results = []
        for input_text in inputs:
            # Generate a mock completion based on input
            completion_text = f"completed: {input_text[:20]}"
            results.append(MockGenerationResult(completion_text))
        return results


# Create mock data
data_entry_lists = [
    {
        "prompt": "def add(a, b):\n    return",
        "id": 0
    },
    {
        "prompt": "def multiply(x, y):\n    result =",
        "id": 1
    }
]

llm = MockLLM()

sampling_params = {
    "max_tokens": 128,
    "temperature": 0.7
}

ARGS = {
    "data_entry_lists": data_entry_lists,
    "llm": llm,
    "sampling_params": sampling_params
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
jsonify Ran
ran; our contract draft was wrong, not the code
huangd1999/EffiCoder/LLaMA-Factory/src/llamafactory/api/common.py
code served (permissive licence) · get_code("57583cf880d95444")
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 str. The image it ran in was not recorded. If your copy returns the same type 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 json
from pydantic import BaseModel

class SampleModel(BaseModel):
    name: str
    value: int
    description: str = "default"

# Create an instance with some fields set
data_instance = SampleModel(name="test", value=42)

ARGS = {
    "data": data_instance
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
report_max_memory_usage Ran
ran, honoured the contract we drafted
huangd1999/efficoder/src/calculate_memory_usage.py
code served (permissive licence) · get_code("e93025e1ec334538")
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 float, 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 tempfile
import os

# Create a temporary dat file with memory usage data
temp_dir = tempfile.mkdtemp()
dat_file_path = os.path.join(temp_dir, "memory_usage.dat")

# Write sample memory usage data to the file
with open(dat_file_path, 'w') as f:
    f.write("timestamp memory_mb function\n")
    f.write("0.1 50.5 some_function\n")
    f.write("0.2 75.3 another_function\n")
    f.write("0.3 120.7 __main__.main_function\n")
    f.write("0.4 95.2 yet_another_function\n")
    f.write("0.5 150.1 final_function\n")

ARGS = {
    "dat_file_path": dat_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
report_max_memory_usage Ran
ran, honoured the contract we drafted
huangd1999/EffiCoder/src/calculate_memory_usage.py
code served (permissive licence) · get_code("1e930421d6b5e3e8")
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 float, 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 tempfile
import os

# Create a temporary .dat file with memory profiling data
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.dat', delete=False)
temp_file_path = temp_file.name

# Write header and sample memory profiling lines
temp_file.write("Filename:Function:Line\tMemory(MB)\n")
temp_file.write("module.py:some_function:10\t45.3\n")
temp_file.write("__main__.run:5\t100.5\n")  # This line will be skipped due to __main__ check
temp_file.write("module.py:another_function:20\t32.1\n")
temp_file.write("module.py:third_function:30\t78.9\n")
temp_file.close()

ARGS = {
    'dat_file_path': temp_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
report_max_memory_usage Ran
ran, honoured the contract we drafted
huangd1999/effi-code/src/code_efficiency_calculator.py
code served (permissive licence) · get_code("25eee3ce8daf1692")
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 float, 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 tempfile
import os

# Create a temporary file with memory usage data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.dat')
temp_file.write("TIMESTAMP MEM_MB CPU_USAGE\n")
temp_file.write("MEM 256.5 45.2\n")
temp_file.write("CPU 0.8 92.1\n")
temp_file.write("MEM 512.3 78.9\n")
temp_file.write("MEM 384.7 61.5\n")
temp_file.write("GPU 0.5 23.4\n")
temp_file.write("MEM 768.9 88.3\n")
temp_file.close()

dat_file_path = temp_file.name

ARGS = {
    "dat_file_path": dat_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 2 the same month, 3 later) and 4 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
jsonify 28 other papers
6 dated earlier, 2 the same month, 20 later
2403.13372 (2024-03)
LLAMAFACTORY: Unified Efficient Fine-Tuning of 100+ Language Models
2405.04760 (2024-05)
Large Language Models for Cyber Security: A Systematic Literature Review
2406.04496 (2024-06)
Time Sensitive Knowledge Editing through Efficient Finetuning
and 25 more not named here
dictify 14 other papers
4 dated earlier, 2 the same month, 8 later
2403.13372 (2024-03)
LLAMAFACTORY: Unified Efficient Fine-Tuning of 100+ Language Models
2407.08044 (2024-07)
RoLoRA: Fine-tuning Rotated Outlier-free LLMs for Effective Weight-Activation Quantization
2409.13183 (2024-09)
$\textit{SKIntern}$: Internalizing Symbolic Knowledge for Distilling Better CoT Capabilities into Small Language Models
and 11 more not named here
create_score_evaluation_response 2 other papers
1 dated earlier, 1 later
2403.13372 (2024-03)
LLAMAFACTORY: Unified Efficient Fine-Tuning of 100+ Language Models
2505.16869 (2025-05)
MPO: Multilingual Safety Alignment via Reward Gap Optimization
calculate_memory_usage 1 other paper
1 dated earlier
2405.15189 (2024-05)
EFFI-LEARNER: Enhancing Efficiency of Generated Code via Self-Optimization
calculate_memory_usage 1 other paper
1 dated earlier
2405.15189 (2024-05)
EFFI-LEARNER: Enhancing Efficiency of Generated Code via Self-Optimization
calculate_runtime 1 other paper
1 dated earlier
2405.15189 (2024-05)
EFFI-LEARNER: Enhancing Efficiency of Generated Code via Self-Optimization
calculate_runtime 1 other paper
1 dated earlier
2405.15189 (2024-05)
EFFI-LEARNER: Enhancing Efficiency of Generated Code via Self-Optimization
report_max_memory_usage 1 other paper
1 dated earlier
2405.15189 (2024-05)
EFFI-LEARNER: Enhancing Efficiency of Generated Code via Self-Optimization

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

As Large Language Models (LLMs) play an important role in code generation, enhancing both correctness and efficiency has become crucial. Current methods primarily focus on correctness, often overlooking efficiency. To address this gap, we introduce EFFICODER to improve both aspects by fine-tuning LLMs on a high-quality dataset EFFIINSTRUCT comprising correct and efficient code samples. Our method involves leveraging multiple LLMs to generate diverse candidate code solutions for various tasks across different programming languages. We then evaluate these solutions by measuring their execution time and memory usage through local execution. The code solution with the lowest execution time and memory consumption is selected as the final output for each task. Experimental results demonstrate significant improvements when fine-tuning with EF-FIINSTRUCT. For instance, Qwen2.5-Coder-7B-Instruct's pass@1 score increases from 44.8% to 57.7%, while the average execution time for correct tasks decreases by 48.4%. EFFICODER offers a scalable and effective solution for advancing AIdriven code generation, benefiting both software development and computational problem-solving. Dataset and Code are available at https:// github.com/huangd1999/EffiCoder.

For agents

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

get_harvested_code_for_paper("2410.10209")
get_code_for_paper("2410.10209")
have("2410.10209")

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

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

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

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

Connect an agent — have() is free.