SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.16196 · 2025

Efficient and Privacy-Preserving Soft Prompt Transfer for LLMs

Jing Xu, Christopher Choquette-Choo, Adam Dziedzic, Franziska Boenisch, Xun Wang, Michael Backes

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2506.16196.json · badge: /api/ran/2506.16196.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
sprintml/POST community
Papers with Code archive
4 ran · 1 no recorded run
FunctionStatusWhere it lives
GroupedBatchSampler Ran
ran on a synthesized input · constructed an object; no result was computed
sprintml/POST/distill/distiller.py
code served (permissive licence) · get_code("2776305dc3913703")
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, GroupedBatchSampler: 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
from torch.utils.data import BatchSampler, RandomSampler

torch.manual_seed(0)

# Create a simple dataset
dataset_size = 10

# Create a base sampler
sampler = RandomSampler(range(dataset_size))

# Create group_ids: assign each sample to a group (continuous integers from 0)
# For 10 samples, we'll create 3 groups
group_ids = [0, 0, 0, 1, 1, 1, 2, 2, 2, 0]

# Batch size
batch_size = 3

ARGS = {
    'sampler': sampler,
    'group_ids': group_ids,
    'batch_size': batch_size,
}
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 GroupedBatchSampler — 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 GroupedBatchSampler 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
LmSeqsDataset Ran
ran on a synthesized input · constructed an object; no result was computed
sprintml/POST/distill/distiller.py
code served (permissive licence) · get_code("688a307b89d6a23f")
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, LmSeqsDataset: 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 numpy as np
from argparse import Namespace

torch.manual_seed(0)

# Create a minimal params object with all required attributes
params = Namespace(
    max_model_input_size=50,
    mlm=True,
    special_tok_ids={
        'cls_token': 101,
        'sep_token': 102,
        'pad_token': 0,
        'unk_token': 100,
        'bos_token': 101,
        'eos_token': 102,
    },
    is_master=True,
)

# Create sample data: list of numpy arrays of token IDs
# Each sequence starts with cls_token and ends with sep_token
data = [
    np.array([101, 10, 20, 30, 40, 50, 60, 70, 80, 90, 102], dtype=np.int64),
    np.array([101, 11, 21, 31, 41, 51, 61, 71, 81, 91, 102], dtype=np.int64),
    np.array([101, 12, 22, 32, 42, 52, 62, 72, 82, 92, 102], dtype=np.int64),
    np.array([101, 13, 23, 33, 43, 53, 63, 73, 83, 93, 102], dtype=np.int64),
]

ARGS = {
    'params': params,
    'data': data,
    'n_prompt': 0,
}
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 LmSeqsDataset — 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 LmSeqsDataset output the recorded ndim 1 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; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sprintml/POST/distill/distiller.py
code served (permissive licence) · get_code("25d7bb8324664e8c")
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 int; 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
import bisect
import copy

torch.manual_seed(0)

# Analyze the function:
# - x: should be iterable of numeric values
# - bins: should be iterable of numeric values (gets deepcopied, sorted, and used with bisect.bisect_right)

# Create test data
x = [1.5, 3.2, 0.8, 2.1, 4.5]  # list of floats to quantize
bins = [2.0, 1.0, 3.5, 0.5]    # list of bin edges (will be sorted internally)

ARGS = {
    "x": x,
    "bins": bins,
}
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 int — 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_lengths_groups Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sprintml/POST/distill/distiller.py
code served (permissive licence) · get_code("67a9da75497dd934")
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 int; 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 bisect
import copy
import numpy as np
import logging

logging.basicConfig(level=logging.INFO)

ARGS = {
    'lengths': [5, 12, 8, 15, 3, 20, 7, 11],
    'k': 20
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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 int — 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
Distiller Not yet run
unverified (harvested, no recorded run)
sprintml/POST/distill/distiller.py
code served (permissive licence) · get_code("13ba4f8d88581bca")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

FunctionAlso present inEarliest-datedOthers named
GroupedBatchSampler
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1910.01108 (2019-10)
DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
create_lengths_groups
brick of this paper's assembly: helper
1 other paper
1 dated earlier
1910.01108 (2019-10)
DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter

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-24.

Repositories linked to this paper

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

Abstract

Prompting has become a dominant paradigm for adapting large language models (LLMs). While discrete (textual) prompts are widely used for their interpretability, soft (parameter) prompts have recently gained traction in APIs. This is because they can encode information from more training samples while minimizing the user's token usage, leaving more space in the context window for task-specific input. However, soft prompts are tightly coupled to the LLM they are tuned on, limiting their generalization to other LLMs. This constraint is particularly problematic for efficiency and privacy: (1) tuning prompts on each LLM incurs high computational costs, especially as LLMs continue to grow in size. Additionally, (2) when the LLM is hosted externally, soft prompt tuning often requires sharing private data with the LLM provider. For instance, this is the case with the NVIDIA NeMo API. To address these issues, we propose POST (Privacy Of Softprompt Transfer), a framework that enables private tuning of soft prompts on a small model and subsequently transfers these prompts to a larger LLM. POST uses knowledge distillation to derive a small model directly from the large LLM to improve prompt transferability, tunes the soft prompt locally-optionally with differential privacy guarantees-and transfers it back to the larger LLM using a small public dataset. Our experiments show that POST reduces computational costs, preserves privacy, and effectively transfers high-utility soft prompts. Our code is available at https://github.com/sprintml/POST.

For agents

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

get_harvested_code_for_paper("2506.16196")
get_code_for_paper("2506.16196")
have("2506.16196")

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

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

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

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

Connect an agent — have() is free.