This is the Noise Pruning (NP) tool model of DataOrchestra. It is the lightest of the three cleaning stages: given a document chunk, it emits whole-line deletion operations that strip line-level noise (site navigation, ads, share bars, boilerplate, catalog metadata, etc.) without rewriting any surviving text. It is used together with the orchestrator and the SR/PA rewriter, but can also be run on its own.
one line-numbered chunk (≤ 1024 Qwen3 tokens) wrapped in [DOC] / [/DOC]
Output
one or more remove_lines(start, end) ops, or skip()
Inference mode
non-thinking, greedy decoding
The model is trained ProX-style (following ProX): unlike ProX/RefineX, it keeps only whole-line removal and drops in-line substring edits, which simplifies the duty of this small tool model.
Usage
The model sees the chunk with a 0-indexed, zero-padded [NNN] prefix on every line, wrapped in [DOC] / [/DOC], under a one-line system prompt. It responds with remove_lines(start, end) calls (both ends inclusive, line-indices referring to the [NNN] prefixes) or the sentinel skip() when nothing should be removed. You line-number the chunk, parse the ops, and delete those lines.
python
1import re
2from transformers import AutoModelForCausalLM, AutoTokenizer
34MODEL ="DataOrchestra/NP-0.6B"5tokenizer = AutoTokenizer.from_pretrained(MODEL)6model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype="auto", device_map="auto")78SYSTEM_PROMPT ="You are an excellent noise pruning model for pretraining data cleaning."9REMOVE_LINES_RE = re.compile(r"remove_lines\s*\(\s*(\d+)\s*,\s*(\d+)\s*\)")101112defprune(chunk:str)->str:13 lines = chunk.split("\n")14# NP sees a 0-indexed [NNN] prefix on every line (add_line_numbers()).15 numbered ="\n".join(f"[{i:03d}] {line}"for i, line inenumerate(lines))16 messages =[17{"role":"system","content": SYSTEM_PROMPT},18{"role":"user","content":f"[DOC]\n{numbered}\n[/DOC]"},# wrap_doc()19]20 text = tokenizer.apply_chat_template(21 messages,22 tokenize=False,23 add_generation_prompt=True,24 enable_thinking=False,# NP runs non-thinking25)26 inputs = tokenizer(text, return_tensors="pt").to(model.device)27 generated = model.generate(28**inputs,29 max_new_tokens=1024,30 do_sample=False,# greedy: temperature 0.0 / top_p 1.031)32 response = tokenizer.decode(33 generated[0][inputs.input_ids.shape[1]:], skip_special_tokens=True34)3536# Parse remove_lines(start, end); no ops (e.g. skip()) -> keep the chunk as-is.37 remove =set()38for start, end in REMOVE_LINES_RE.findall(response):39for i inrange(int(start),int(end)+1):40if0<= i <len(lines):41 remove.add(i)42return"\n".join(line for i, line inenumerate(lines)if i notin remove)434445chunk =(46"Home | About | Contact\n"47"The French Revolution began in 1789 and reshaped European politics.\n"48"Share this on Facebook | Twitter\n"49"It led to the rise of Napoleon Bonaparte."50)51print(prune(chunk))52# -> keeps the two content lines, drops the nav header and the share bar
Serving with vLLM
For high-throughput curation, serve the model with an OpenAI-compatible endpoint. Note the chunk must still be line-numbered by the caller before sending:
1from openai import OpenAI
23client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="EMPTY")4resp = client.chat.completions.create(5 model="DataOrchestra-NP-0.6B",6 messages=[7{"role":"system","content":"You are an excellent noise pruning model for pretraining data cleaning."},8{"role":"user","content":"[DOC]\n[000] Home | About | Contact\n[001] <your content line>\n[/DOC]"},9],10 temperature=0.0,11 max_tokens=1024,12 extra_body={"chat_template_kwargs":{"enable_thinking":False}},13)14print(resp.choices[0].message.content)
Output Format
The model emits one operation per line:
remove_lines(0, 0)
remove_lines(2, 2)
remove_lines(start, end) — delete lines start through endinclusive, where indices refer to the [NNN] prefixes of the input. Only whole-line removal is supported.
skip() (or an empty / op-free response) — remove nothing; the chunk is kept unchanged.
Apply the ops by deleting the referenced lines (process them bottom-up, or collect all removed indices first, so earlier deletions do not shift later indices).
Citation
If you find this work useful, please cite:
bibtex
1@article{dataorchestra2026,
2 title = {DataOrchestra: Learning to Orchestrate Per-Example Curation of Pretraining Data},
3 author = {Huang, Zhen and Wang, Yikun and Xia, Shijie and Liu, Pengfei},
4 year = {2026},
5 journal = {arXiv preprint arXiv:2607.24717}
6}