SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.01078 · 2026

Attend to Your Own Thoughts: Breaking the Barrier for Post-Training Quantization of Reasoning LLMs through the Lens of 1.58-Bit Quantization

Chao Li, Anbang Yao, Yangyuxuan Kang, Jiawei Fan, Shigeng Wang

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-23; 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/2608.01078.json · badge: /api/ran/2608.01078.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
IntelChina-AI/BitTern community
Papers with Code archive
6 ran · 0 no recorded run
FunctionStatusWhere it lives
DoubleScaleSigmoid Ran
ran on a synthesized input · constructed an object; no result was computed
IntelChina-AI/BitTern/projects/cat-q/quantize/quantizer.py
code served (permissive licence) · get_code("2882987b968d75d7")
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, DoubleScaleSigmoid: 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)

# The DoubleScaleSigmoid module takes:
# - dim: integer dimension
# - alpha: float scale factor (default 1.0)
# - beta: float shift factor (default 0.0)

ARGS = {
    "dim": 4,
    "alpha": 1.0,
    "beta": 0.0,
}
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 DoubleScaleSigmoid — 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 DoubleScaleSigmoid 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
ScaleExp Ran
ran on a synthesized input · constructed an object; no result was computed
IntelChina-AI/BitTern/projects/cat-q/quantize/quantizer.py
code served (permissive licence) · get_code("89e1deedafc52d5b")
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, ScaleExp: 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 = {
    "dim": 4,
    "alpha": 2.5,
}
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 ScaleExp — 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 ScaleExp 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
ScaleSigmoid Ran
ran on a synthesized input · constructed an object; no result was computed
IntelChina-AI/BitTern/projects/cat-q/quantize/quantizer.py
code served (permissive licence) · get_code("707ed5efd0529df9")
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, ScaleSigmoid: 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 = {
    'dim': 4,
    'alpha': 1.0,
    'beta': 0.0
}
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 ScaleSigmoid — 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 ScaleSigmoid 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
ScaleSoftPlus Ran
ran on a synthesized input · constructed an object; no result was computed
IntelChina-AI/BitTern/projects/cat-q/quantize/quantizer.py
code served (permissive licence) · get_code("8350dc3427dfa9a1")
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, ScaleSoftPlus: 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)

class ScaleSoftPlus(nn.Module):

    def __init__(self, dim):
        super().__init__()
        self.bound_factor = nn.Parameter(torch.zeros((dim, 1)), requires_grad=False)

    def forward(self):
        return torch.nn.functional.softplus(self.bound_factor) * 1.4427

ARGS = {
    "dim": 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 ScaleSoftPlus — 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 ScaleSoftPlus 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
TernaryQuantizer Ran
ran on a synthesized input · constructed an object; no result was computed
IntelChina-AI/BitTern/projects/cat-q/quantize/quantizer.py
code served (permissive licence) · get_code("15872d240833b69d")
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, TernaryQuantizer: 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
import math

torch.manual_seed(0)

# Define weight_quant_params dict with all required keys
weight_quant_params = {
    'group_size': 2,
    'shift_mu': True,
    'drop_quant_mu': False,
    'ter_scale_type': 'absmean',
    'init_scale_from_raw_weights': False,
    'learnable_scale': True,
    'learnable_mu': True,
    'learnable_round': True,
    'init_round_thd': 0.5,
    'learnable_factor_act': 'sigmoid'
}

# Create a small weight tensor with shape (4, 6)
# This will result in dim = 4 * ceil(6 / 2) = 4 * 3 = 12
weight = torch.randn(4, 6)

# Define shape parameter based on weight tensor
shape = weight.shape

ARGS = {
    'weight_quant_params': weight_quant_params,
    'shape': shape
}
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 TernaryQuantizer — 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 TernaryQuantizer 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
_factor_module Ran
ran; our contract draft was wrong, not the code
IntelChina-AI/BitTern/projects/cat-q/quantize/quantizer.py
code served (permissive licence) · get_code("46a37998b3a201a5")
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 ScaleSigmoid. 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 = {
    'kind': 'sigmoid',
    'dim': 4,
    'round_factor': False,
}
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 ScaleSigmoid — a ScaleSigmoid output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ScaleSigmoid 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

While ternary (i.e., 1.58-bit) quantization can substantially reduce memory footprint and accelerate inference for LLMs, its adoption in real-world applications remains limited. This is primarily due to its susceptibility to severe performance degradation. Existing state-of-the-art methods mainly rely on quantization-aware training to mitigate this issue and thus incur prohibitive costs, scaling poorly across complex reasoning tasks, diverse model architectures and large-scale models. To address these limitations, we propose ScaleQ-1.58, a scalable ternary post-training quantization (PTQ) framework for reasoning LLMs. Its core insight stems from an empirical finding: although modern LLMs are typically trained to exhibit chain-ofthought reasoning capabilities, in the PTQ regime, even the latest CAT-Q method based on learning-based differentiable ternarization still leads to performance collapse on challenging mathematics and coding tasks when using conventional calibration schemes that ignore the model's reasoning process. Driven by this finding, we introduce a simple calibration approach, Attend to Your Own Thoughts (AYOT), where reasoning traces and final answers generated by the pre-trained high-precision target LLM on a proper set of calibration samples are used as the context input during the ternarization process, along with the corresponding questions. ScaleQ-1.58 is formed by simply integrating AYOT with CAT-Q, which demonstrates several scaling properties: (1) with only 4M calibration tokens, Qwen3-1.7B ternarized by ScaleQ-1.58 reaches over 90.52% of the performance of the prior best BitNet b1.58 2B4T averaged over 4 mathematics and coding tasks, and our ternary Qwen3-4B shows an absolute gain of 8.97%, while requiring 1,000,000× fewer calibration tokens for quantization; (2) ScaleQ-1.58 generalizes well to both dense and MoE architectures, with performance improving as model scale increases (up to 235B parameters); (3) ScaleQ-1.58 demonstrates strong generalization across tasks of varying difficulty levels, including mathematics, coding and scientific logic reasoning, as well as commonsense reasoning and basic language generation; (4) its performance continues to improve as the number of calibration tokens increases. Notably, AYOT also exhibits strong generalization ability across other quantization bit-widths. Code will be available at https://github.com/IntelChina-AI/BitTern. * Equal contribution. This work was done when Shigeng Wang was an intern at Intel Labs China. † Corresponding author who conceived the project and led the writing of the paper.

For agents

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

get_harvested_code_for_paper("2608.01078")
get_code_for_paper("2608.01078")
have("2608.01078")

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

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

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

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

Connect an agent — have() is free.