Papers › PT²-LLM: Post-Training Ternarization for Large Language Models

PT²-LLM: Post-Training Ternarization for Large Language Models

27 Sep 2025ICLRarXiv:2510.03267added by Syntology

Xianglong Yan, Chengzhu Bao, Zhiteng Li, Tianao Zhang, Kaicheng Yang, Haotong Qin, Ruobing Xie, Xingwu Sun, Yulun Zhang

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Large Language Models (LLMs) have shown impressive capabilities across diverse tasks, but their large memory and compute demands hinder deployment. Ternarization has gained attention as a promising compression technique, delivering substantial size reduction and high computational efficiency. However, its potential in the post-training quantization (PTQ) setting remains underexplored, due to the challenge of training-free parameter optimization and the quantization difficulty posed by outliers and dispersed weights. To address these issues, we propose PT²-LLM, a post-training ternarization framework tailored for LLMs. At its core is an Asymmetric Ternary Quantizer equipped with a two-stage refinement pipeline: (1) Iterative Ternary Fitting (ITF), which alternates between optimal ternary grid construction and flexible rounding to minimize quantization error, and (2) Activation-aware Grid Alignment (AGA), which further refines the ternary grid to better match full-precision outputs. In addition, we propose a plug-and-play Structural Similarity-based Reordering (SSR) strategy that leverages inter-column structural similarity to ease quantization and mitigate outlier effects, further enhancing overall performance. Extensive experiments demonstrate that PT²-LLM delivers competitive performance against state-of-the-art (SOTA) 2-bit PTQ methods with lower memory cost, while also accelerating both prefill and decoding to achieve end-to-end speedup. The code and models will be available at https://github.com/XIANGLONGYAN/PT2-LLM.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2510.03267")

Code

Syntology Ran 1 of 24 code samples harvested from 1 repository linked to this paper; 23 have no recorded run. Of those that ran: 1 ran · our draft was wrong.

By repository: found in paper text by Syntology: 24 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

XIANGLONGYAN/PT2-LLM found in paper text by SyntologyApache-2.0 report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 1 ran; 0 honoured the contract we drafted; 23 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
23unverified

Licence: 0 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from XIANGLONGYAN/PT2-LLM. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

find_layers XIANGLONGYAN/PT2-LLM/pt2_llm/model_utils.py found in paper text by Syntology ran · our draft was wrong Apache-2.0 (permissive) · a9e7f2cdf016b88b · report
add_common_args XIANGLONGYAN/PT2-LLM/pt2_llm/eval_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 86b2b0edb3228d3b · report
atq XIANGLONGYAN/PT2-LLM/pt2_llm/quantizer.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 3012b28251a8b320 · report
cleanup_memory XIANGLONGYAN/PT2-LLM/pt2_llm/model_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · a8119d4e31042017 · report
cluster_based_perm XIANGLONGYAN/PT2-LLM/pt2_llm/gptq.py found in paper text by Syntology unverified Apache-2.0 (permissive) · dab5f3ef2b72c0dc · report
cluster_based_perm XIANGLONGYAN/PT2-LLM/pt2_llm/gptq_ssr.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 290494739e1414f0 · report
cluster_based_perm_balanced XIANGLONGYAN/PT2-LLM/pt2_llm/gptq_ssr.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 00150b858dfafe07 · report
count_ternary_patterns XIANGLONGYAN/PT2-LLM/pt2_llm/gptq.py found in paper text by Syntology unverified Apache-2.0 (permissive) · d861ac5b9a252b36 · report
eval_ppl XIANGLONGYAN/PT2-LLM/run_ppl_eval.py found in paper text by Syntology unverified Apache-2.0 (permissive) · f044b684b951e585 · report
get_model XIANGLONGYAN/PT2-LLM/quantize.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 75fa5d245db56957 · report
get_ppl_eval_loaders XIANGLONGYAN/PT2-LLM/run_ppl_eval.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 88e150118e4e25e0 · report
get_ppl_eval_loaders_original XIANGLONGYAN/PT2-LLM/run_ppl_eval.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 9e96f484accf8fe8 · report
get_ptb XIANGLONGYAN/PT2-LLM/pt2_llm/data.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 1b0736b420b42de6 · report
get_tokenizer XIANGLONGYAN/PT2-LLM/pt2_llm/data.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 9b51f71e770bd399 · report
get_wikitext2 XIANGLONGYAN/PT2-LLM/pt2_llm/data.py found in paper text by Syntology unverified Apache-2.0 (permissive) · bc9148e3beb23d8f · report
llama_eval XIANGLONGYAN/PT2-LLM/pt2_llm/eval_ppl.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 7823347a3a40550c · report
load_quant XIANGLONGYAN/PT2-LLM/pt2_llm/eval_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 9fa0c8cd09b878ff · report
opt_eval XIANGLONGYAN/PT2-LLM/pt2_llm/eval_ppl.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 576d385291767a99 · report
qwen_eval XIANGLONGYAN/PT2-LLM/pt2_llm/eval_ppl.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 7cb1e73581e2b09c · report
setup_logger XIANGLONGYAN/PT2-LLM/quantize.py found in paper text by Syntology unverified Apache-2.0 (permissive) · b50e1058ea310be4 · report
ternary_init XIANGLONGYAN/PT2-LLM/pt2_llm/quantizer.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 9ef9b159a0d540b7 · report
ternary_init_only XIANGLONGYAN/PT2-LLM/pt2_llm/quantizer.py found in paper text by Syntology unverified Apache-2.0 (permissive) · a63bf3bef780168d · report
ternary_pattern_to_id XIANGLONGYAN/PT2-LLM/pt2_llm/gptq.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 9516b5796ab3b949 · report
topk_similar_columns XIANGLONGYAN/PT2-LLM/pt2_llm/gptq_ssr.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 55b80284fff862b9 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2510.03267, was issued in October 2025, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections