SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.12870 · EMNLP · 2023

Lion: Adversarial Distillation of Proprietary Large Language Models

Wei Wang, Yuxin Jiang, Mingyang Chen, Chunkit Chan

arXiv · PDF · Open in the Atlas

Code that ran

6 of 11 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 2 failures of our instrument; 5 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/2305.12870.json · badge: /api/ran/2305.12870.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
yjiangcm/lion canonical (classifier label)
classifier basis: census
6 ran · 5 no recorded run
FunctionStatusWhere it lives
gen_prompt Ran
ran on a synthesized input
yjiangcm/lion/src/chatgpt_referee.py
code served (permissive licence) · get_code("2d9884b05d0bfa25")
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

ARGS = {
    "ques": "What is the capital of France?",
    "ans1": "The capital of France is Paris, a city known for its iconic landmarks like the Eiffel Tower and Louvre Museum.",
    "ans2": "Paris is the capital and most populous city of France, located in the north-central part of the country."
}
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
generate_prompt Ran
ran on a synthesized input
yjiangcm/lion/src/lion_inference.py
code served (permissive licence) · get_code("36dc95d12630a6f0")
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

torch.manual_seed(0)

# The function takes a single parameter 'instruction' which is a string
# It constructs and returns a formatted prompt string

ARGS = {
    'instruction': 'What is the capital of France?'
}
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
get_json_list Ran
ran on a synthesized input
yjiangcm/lion/src/utils.py
code served (permissive licence) · get_code("e74ea48e46988286")
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 json
import tempfile
import os

# Create a temporary JSON file with valid test data
temp_dir = tempfile.mkdtemp()
test_file_path = os.path.join(temp_dir, "test.json")

# Write a simple JSON list to the file
test_data = [
    {"id": 1, "name": "item1"},
    {"id": 2, "name": "item2"},
    {"id": 3, "name": "item3"}
]

with open(test_file_path, 'w') as f:
    json.dump(test_data, f)

# Define ARGS with the file_path parameter
ARGS = {
    "file_path": test_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 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
jload Ran
ran; our contract draft was wrong, not the code
yjiangcm/lion/src/utils.py
code served (permissive licence) · get_code("d07d04439cd1d44f")
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 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 io
import json
import tempfile
import os

# Create a temporary JSON file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "dict"}
}

with open(temp_file, 'w') as f:
    json.dump(test_data, f)

# Define ARGS with the file path
ARGS = {
    "f": temp_file,
    "mode": "r"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
parse_score Ran
ran on a synthesized input
yjiangcm/lion/src/chatgpt_referee.py
code served (permissive licence) · get_code("eb6629df9a940cb4")
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

# The function parse_score takes a single parameter: review (a string)
# It splits the string by newlines and extracts the last two lines
# It expects these lines to contain "Assistant 1" and "Assistant 2" with scores
# The scores are extracted after a colon and converted to float

review_text = """Some evaluation results:

Assistant 1: 8.5
Assistant 2: 7.2"""

ARGS = {
    'review': review_text
}
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
preprocess Ran
ran; our contract draft was wrong, not the code
yjiangcm/lion/src/train_deepspeed.py
pointer only (licence: MIT); the stored copy get_code serves, from GCYZSL/O3-LLM-UNLEARNING, is pointer only (licence: NONE) · get_code("817d5f759487007d")
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 GCYZSL/O3-LLM-UNLEARNING, and GitHub detected no licence in that repository when it was checked. 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.

encode_prompt Not yet run
unverified (harvested, no recorded run)
yjiangcm/lion/src/generate_easy_instruction.py
code served (permissive licence) · get_code("e19e3003e9840448")
How it ran

no invocation recorded.

get_eval Not yet run
unverified (harvested, no recorded run)
yjiangcm/lion/src/chatgpt_inference.py
code served (permissive licence) · get_code("8cd557465a1f5553")
How it ran

no invocation recorded.

get_eval Not yet run
unverified (harvested, no recorded run)
yjiangcm/lion/src/chatgpt_referee.py
code served (permissive licence) · get_code("5823dba3817cc067")
How it ran

no invocation recorded.

get_model_answers Not yet run
unverified (harvested, no recorded run)
yjiangcm/lion/src/lion_inference.py
code served (permissive licence) · get_code("f529caa047a46653")
How it ran

no invocation recorded.

post_process_gpt3_response Not yet run
unverified (harvested, no recorded run)
yjiangcm/lion/src/generate_easy_instruction.py
code served (permissive licence) · get_code("a2aee0157546c3ef")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 2 later) and 9 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
jload 46 other papers
1 dated earlier, 2 the same month, 43 later
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
2305.13068 (2023-05)
Making Language Models Better Tool Learners with Execution Feedback
2305.14825 (2023-05)
Large Language Models are In-Context Semantic Reasoners rather than Symbolic Reasoners
and 43 more not named here
preprocess 23 other papers
23 later
2306.17194 (2023-06)
On the Exploitability of Instruction Tuning
2308.07286 (2023-08)
The Devil is in the Errors: Leveraging Large Language Models for Fine-grained Machine Translation Evaluation
2308.09583 (2023-08)
WizardMath: EMPOWERING MATHEMATICAL REASON-ING FOR LARGE LANGUAGE MODELS VIA Reinforced Evol-Instruct
and 20 more not named here

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

The practice of transferring knowledge from a sophisticated, proprietary large language model (LLM) to a compact, open-source LLM has garnered considerable attention. Previous works have focused on a unidirectional knowledge distillation way by aligning the responses of the student model with those of the teacher models to a set of instructions. Nevertheless, they overlooked the possibility of incorporating any "feedback"-identifying challenging instructions where the student model's performance falls short-to boost the student model's proficiency iteratively. To this end, we propose a novel adversarial distillation framework for a more efficient knowledge transfer. Leveraging the versatile role adaptability of LLMs, we prompt the teacher model to identify "hard" instructions and generate new "hard" instructions for the student model, creating a three-stage adversarial loop of imitation, discrimination, and generation. By applying this adversarial framework, we successfully transfer knowledge from ChatGPT to a student model (named Lion), using a mere 70k training data. Our results show that Lion-13B not only achieves comparable open-ended generation capabilities to Chat-GPT but surpasses conventional state-of-the-art (SOTA) instruction-tuned models like Vicuna-13B by 55.4% in challenging zero-shot reasoning benchmarks such as BIG-Bench Hard (BBH) and 16.7% on AGIEval. 1 * The two authors have equal contributions. 1 Code and model can be found at https://github.com/ YJiangcm/Lion.

For agents

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

get_harvested_code_for_paper("2305.12870")
get_code_for_paper("2305.12870")
have("2305.12870")

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

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

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

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

Connect an agent — have() is free.