SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.00978 · 2023

AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration

Chuang Gan, Ji Lin, Song Han, Wei-Ming Chen, Wei-Chen Wang, Guangxuan Xiao, Jiaming Tang, Shang Yang, Haotian Tang, Xingyu Dang, Tinychat Computer, ( Jetson, and 1 more

arXiv · PDF · Open in the Atlas

Code that ran

16 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 2 have no contract verdict; 12 failures of our instrument; 2 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/2306.00978.json · badge: /api/ran/2306.00978.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
internlm/lmdeploy canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
ggerganov/llama.cpp canonical (classifier label)
classifier basis: census
3 ran · 2 no recorded run
turboderp/exllama canonical (classifier label)
classifier basis: census
1 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
xvyaward/qeft community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Quantizer Ran
ran on a synthesized input · constructed an object; no result was computed
xvyaward/qeft/qeft/quant.py
code served (permissive licence) · get_code("5608d56b0c71e653")
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 an instance of its own class, Quantizer: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'bits': 8,
    'perchannel': False,
    'sym': False,
    'mse': False,
    'norm': 2.4,
    'group_size': -1,
}
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 Quantizer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Quantizer 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
check_vl_llm Ran
ran, violated the contract we drafted
internlm/lmdeploy/lmdeploy/archs.py
code served (permissive licence) · get_code("2bf6c00c566b801c")
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

# Test case 1: DeepseekV2ForCausalLM with language_config and vision_config
config_deepseek = {
    'language_config': {
        'architectures': ['DeepseekV2ForCausalLM']
    },
    'vision_config': {},
    'architectures': ['DeepseekV2ForCausalLM']
}

# Test case 2: Supported architecture - LlavaLlamaForCausalLM
config_llava = {
    'architectures': ['LlavaLlamaForCausalLM']
}

# Test case 3: MultiModalityCausalLM with language_config
config_multimodal = {
    'architectures': ['MultiModalityCausalLM'],
    'language_config': {}
}

# Test case 4: ChatGLMModel with vision_config
config_chatglm = {
    'architectures': ['ChatGLMModel'],
    'vision_config': {}
}

# Test case 5: Unsupported architecture
config_unsupported = {
    'architectures': ['SomeOtherModel']
}

# Use one of the configs for ARGS
ARGS = {
    'backend': 'vllm',
    'config': config_llava
}
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
compile_response_format Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/_guided_decoding.py
code served (permissive licence) · get_code("77ce2711c2f8950d")
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 typing import Any


# Create a mock compiler that has the required methods
class MockCompiler:
    def compile_json_schema(self, source: str):
        return f"compiled_json_schema({source[:20]}...)"
    
    def compile_regex(self, source: str):
        return f"compiled_regex({source[:20]}...)"
    
    def compile_structural_tag(self, source: str):
        return f"compiled_structural_tag({source[:20]}...)"


# Test case 1: json_schema with simple dict schema
response_format_json_schema = {
    'type': 'json_schema',
    'json_schema': {
        'type': 'object',
        'properties': {
            'name': {'type': 'string'},
            'age': {'type': 'integer'}
        }
    }
}

# Test case 2: regex_schema
response_format_regex = {
    'type': 'regex_schema',
    'regex_schema': r'^[a-zA-Z0-9]+$'
}

# Test case 3: json_object
response_format_json_object = {
    'type': 'json_object'
}

# Test case 4: structural_tag
response_format_structural_tag = {
    'type': 'structural_tag',
    'tag_name': 'example_tag',
    'attributes': {'key': 'value'}
}

# Test case 5: text (default)
response_format_text = {
    'type': 'text'
}

# Test case 6: json_schema with nested schema key
response_format_nested = {
    'type': 'json_schema',
    'json_schema': {
        'schema': {
            'type': 'object',
            'properties': {'field': {'type': 'string'}}
        }
    }
}

# Create a compiler instance
compiler = MockCompiler()

# Define ARGS for the primary function compile_response_format
# Using json_schema as the main test case
ARGS = {
    'compiler': compiler,
    'response_format': response_format_json_schema
}
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 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
get_base_tensor_name Ran
ran; our contract draft was wrong, not the code
ggerganov/llama.cpp/convert_lora_to_gguf.py
pointer only (licence: MIT); the stored copy get_code serves, from Shan-HIT/HuoziIME, is pointer only (licence: GPL-3.0) · get_code("2b23d02a693ab3d2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Shan-HIT/HuoziIME, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_model_architecture Ran
ran; our contract draft was wrong, not the code
ggerganov/llama.cpp/conversion/base.py
code served (permissive licence) · get_code("a160a507db9a1d7a")
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 torch
import numpy as np
from enum import IntEnum

class ModelType(IntEnum):
    TEXT = 1
    MMPROJ = 2

# Test case 1: hparams with architectures at top level
hparams_case1 = {
    'architectures': ['StepVLForConditionalGeneration'],
    'text_config': {},
    'vision_config': {}
}

# Test case 2: hparams with text_config architectures
hparams_case2 = {
    'text_config': {
        'architectures': ['BertForCausalLM']
    },
    'vision_config': {}
}

# Test case 3: hparams with vision_config architectures
hparams_case3 = {
    'vision_config': {
        'architectures': ['CLIPVisionTransformer']
    },
    'text_config': {}
}

# Test case 4: hparams with ssm_cfg
hparams_case4 = {
    'ssm_cfg': {
        'layer': 'Mamba'
    },
    'text_config': {},
    'vision_config': {}
}

# Use the first test case for ARGS
ARGS = {
    'hparams': hparams_case1,
    'model_type': ModelType.TEXT
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
get_text Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/model.py
code served (permissive licence) · get_code("7004ae9213140ec9")
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 torch

# Test case 1: content as a string
content_string = "This is a simple text response"

# Test case 2: content as a list of dicts with ChatCompletionContentPartTextParam structure
content_list = [
    {"text": "This is text from a list"},
    {"text": "This is a second element that should be ignored"}
]

ARGS = {
    "content": content_string
}
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 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
quantize Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from xvyaward/qeft
pointer only · get_code("a166c4b79b21b60a")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

quantize_efficient Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from xvyaward/qeft
pointer only · get_code("749e1b68c68b3203")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_str_to_n_bytes Ran
ran, honoured the contract we drafted
ggerganov/llama.cpp/convert_hf_to_gguf.py
code served (permissive licence) · get_code("084d06902aa98802")
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.

# Analyze the function: split_str_to_n_bytes takes a single string parameter
# and converts it to an integer number of bytes based on suffixes (K, M, G) or numeric values

# The function expects:
# - split_str: a string that either:
#   - ends with 'K' (kilobytes)
#   - ends with 'M' (megabytes)
#   - ends with 'G' (gigabytes)
#   - is purely numeric
#   - otherwise raises ValueError

# Test with a valid input
split_str_input = "10M"

ARGS = {
    "split_str": split_str_input
}
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 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
timer Ran
ran on a synthesized input
turboderp/exllama/example_alt_generator.py
code served (permissive licence) · get_code("0339808d73c4cc66")
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 tuple, 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 time

torch.manual_seed(0)

def simple_function():
    """A simple function that does some work and returns a value"""
    result = sum([i**2 for i in range(100)])
    return result

ARGS = {
    "func": simple_function
}
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 tuple, ndim 1, dtype family float — a tuple 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
to_json Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/deepseek_v32_encoding.py
code served (permissive licence) · get_code("c8ad433b6fe18d53")
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 typing import Any

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

# The function to_json takes a single parameter 'value' of type Any
# and attempts to JSON serialize it with ensure_ascii=False, 
# falling back to ensure_ascii=True if that fails.
# We need to provide a value that can be serialized to JSON.

# Test with various types that are JSON-serializable
ARGS = {
    "value": {
        "string": "hello",
        "number": 42,
        "float": 3.14,
        "boolean": True,
        "null": None,
        "list": [1, 2, 3],
        "nested": {"key": "value"},
        "unicode": "こんにちは"
    }
}
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 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
to_json Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/deepseek_v4_encoding.py
code served (permissive licence) · get_code("ee1294cf4de7d8c0")
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 typing import Any

torch_imported = False
try:
    import torch
    torch_imported = True
    torch.manual_seed(0)
except ImportError:
    pass

# Test various types that can be serialized to JSON
ARGS = {
    "value": {
        "string": "hello",
        "number": 42,
        "float": 3.14,
        "bool": True,
        "null": None,
        "list": [1, 2, 3],
        "nested": {"key": "value"}
    }
}
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 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
tool_calls_from_openai_format Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/deepseek_v32_encoding.py
code served (permissive licence) · get_code("e9281cecc545ad6f")
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

# Construct tool_calls in OpenAI format
# The function expects a list of dicts with 'function' key containing 'name' and 'arguments'
tool_calls = [
    {
        'function': {
            'name': 'get_weather',
            'arguments': '{"location": "San Francisco", "unit": "celsius"}'
        }
    },
    {
        'function': {
            'name': 'search',
            'arguments': '{"query": "python programming", "limit": 10}'
        }
    }
]

ARGS = {
    'tool_calls': tool_calls
}
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
tool_calls_from_openai_format Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/deepseek_v4_encoding.py
code served (permissive licence) · get_code("8b8cee237b9dc9d0")
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 json

# Define the ARGS dictionary with valid OpenAI-format tool calls
ARGS = {
    'tool_calls': [
        {
            'function': {
                'name': 'get_weather',
                'arguments': json.dumps({'location': 'San Francisco', 'unit': 'celsius'})
            }
        },
        {
            'function': {
                'name': 'calculate_sum',
                'arguments': json.dumps({'numbers': [1, 2, 3, 4]})
            }
        }
    ]
}
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
tools_from_openai_format Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/deepseek_v32_encoding.py
code served (permissive licence) · get_code("aa8d2113d1ab432e")
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 numpy as np

# The function extracts the 'function' key from each tool in a list of tools
# Tools should be in OpenAI format: a list of dicts with 'function' key

ARGS = {
    'tools': [
        {
            'function': {
                'name': 'get_weather',
                'description': 'Get the weather for a location',
                'parameters': {
                    'type': 'object',
                    'properties': {
                        'location': {'type': 'string'},
                        'unit': {'type': 'string'}
                    }
                }
            },
            'type': 'function'
        },
        {
            'function': {
                'name': 'calculate_sum',
                'description': 'Add two numbers',
                'parameters': {
                    'type': 'object',
                    'properties': {
                        'a': {'type': 'number'},
                        'b': {'type': 'number'}
                    }
                }
            },
            'type': 'function'
        },
        {
            'function': {
                'name': 'send_email',
                'description': 'Send an email',
                'parameters': {
                    'type': 'object',
                    'properties': {
                        'to': {'type': 'string'},
                        'subject': {'type': 'string'},
                        'body': {'type': 'string'}
                    }
                }
            },
            'type': 'function'
        }
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
tools_from_openai_format Ran
ran; our contract draft was wrong, not the code
internlm/lmdeploy/lmdeploy/deepseek_v4_encoding.py
code served (permissive licence) · get_code("a2584d89f3a50342")
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

# Construct valid arguments for tools_from_openai_format
# The function expects a list of dicts in OpenAI tool format
# Each dict should have a 'function' key with function definition data

tools = [
    {
        'type': 'function',
        'function': {
            'name': 'get_weather',
            'description': 'Get the current weather',
            'parameters': {
                'type': 'object',
                'properties': {
                    'location': {'type': 'string'},
                    'unit': {'type': 'string', 'enum': ['celsius', 'fahrenheit']}
                }
            }
        }
    },
    {
        'type': 'function',
        'function': {
            'name': 'calculate_sum',
            'description': 'Calculate the sum of two numbers',
            'parameters': {
                'type': 'object',
                'properties': {
                    'a': {'type': 'number'},
                    'b': {'type': 'number'}
                }
            }
        }
    }
]

ARGS = {
    'tools': tools
}
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
handle_metadata Not yet run
unverified (harvested, no recorded run)
ggerganov/llama.cpp/convert_llama_ggml_to_gguf.py
pointer only (licence: MIT); the stored copy get_code serves, from Shan-HIT/HuoziIME, is pointer only (licence: GPL-3.0) · get_code("cc924525c5e81162")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Shan-HIT/HuoziIME, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_hparams_from_hf Not yet run
unverified (harvested, no recorded run)
ggerganov/llama.cpp/convert_lora_to_gguf.py
code served (permissive licence) · get_code("e26587a77ee23aa1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 13 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 2 the same month, 11 later) and 2 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
get_base_tensor_name 3 other papers
3 later
2406.06282 (2024-06)
PowerInfer-2: Fast Large Language Model Inference on a Smartphone
2604.14159 (2026-04)
HUOZIIME: An On-Device LLM-enhanced Input Method for Deep Personalization
2609.01315 (2026-09)
A Composable Evaluation System for Reproducible Omni-Modal Foundation Model Evaluation
handle_metadata 3 other papers
3 later
2406.06282 (2024-06)
PowerInfer-2: Fast Large Language Model Inference on a Smartphone
2604.14159 (2026-04)
HUOZIIME: An On-Device LLM-enhanced Input Method for Deep Personalization
2609.01315 (2026-09)
A Composable Evaluation System for Reproducible Omni-Modal Foundation Model Evaluation
split_str_to_n_bytes 2 other papers
2 later
2406.06282 (2024-06)
PowerInfer-2: Fast Large Language Model Inference on a Smartphone
2609.01315 (2026-09)
A Composable Evaluation System for Reproducible Omni-Modal Foundation Model Evaluation
check_vl_llm 1 other paper
1 later
2405.20315 (2024-05)
ANAH: Analytical Annotation of Hallucinations in Large Language Models
compile_response_format 1 other paper
1 later
2405.20315 (2024-05)
ANAH: Analytical Annotation of Hallucinations in Large Language Models
get_model_architecture 1 other paper
1 later
2609.01315 (2026-09)
A Composable Evaluation System for Reproducible Omni-Modal Foundation Model Evaluation
get_text 1 other paper
1 later
2405.20315 (2024-05)
ANAH: Analytical Annotation of Hallucinations in Large Language Models
load_hparams_from_hf 1 other paper
1 later
2609.01315 (2026-09)
A Composable Evaluation System for Reproducible Omni-Modal Foundation Model Evaluation
quantize
brick of this paper's assembly: helper
1 other paper
1 the same month
2306.02272 (2023-06)
OWQ: Outlier-Aware Weight Quantization for Efficient Fine-Tuning and Inference of Large Language Models
quantize_efficient
brick of this paper's assembly: helper
1 other paper
1 the same month
2306.02272 (2023-06)
OWQ: Outlier-Aware Weight Quantization for Efficient Fine-Tuning and Inference of Large Language Models
to_json 1 other paper
1 later
2405.20315 (2024-05)
ANAH: Analytical Annotation of Hallucinations in Large Language Models
tool_calls_from_openai_format 1 other paper
1 later
2405.20315 (2024-05)
ANAH: Analytical Annotation of Hallucinations in Large Language Models
tools_from_openai_format 1 other paper
1 later
2405.20315 (2024-05)
ANAH: Analytical Annotation of Hallucinations in Large Language Models

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

Large language models (LLMs) have transformed numerous AI applications. On-device LLM is becoming increasingly important: running LLMs locally on edge devices can reduce the cloud computing cost and protect users' privacy. However, the astronomical model size and the limited hardware resource pose significant deployment challenges. We propose Activation-aware Weight Quantization (AWQ), a hardware-friendly approach for LLM low-bit weight-only quantization. AWQ finds that not all weights in an LLM are equally important. Protecting only 1% salient weights can greatly reduce quantization error. To identify salient weight channels, we should refer to the activation distribution, not weights. To avoid the hardware-inefficient mix-precision quantization, we mathematically derive that scaling up the salient channels can reduce the quantization error. AWQ employs an equivalent transformation to scale the salient weight channels to protect them. The scale is determined by collecting the activation statistics offline. AWQ does not rely on any backpropagation or reconstruction, so it generalizes to different domains and modalities without overfitting the calibration set. AWQ outperforms existing work on various language modeling and domain-specific benchmarks (coding and math). Thanks to better generalization, it achieves excellent quantization performance for instruction-tuned LMs and, for the first time, multi-modal LMs. Alongside AWQ, we implement TinyChat, an efficient and flexible inference framework tailored for 4-bit on-device LLM/VLMs. With kernel fusion and platform-aware weight packing, TinyChat offers more than 3× speedup over the Huggingface FP16 implementation on both desktop and mobile GPUs. It also democratizes the deployment of the 70B Llama-2 model on mobile GPUs.

For agents

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

get_harvested_code_for_paper("2306.00978")
get_code_for_paper("2306.00978")
have("2306.00978")

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

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

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

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

Connect an agent — have() is free.