Text Generation
Transformers
Safetensors
English
qwen3
pretraining-data
data-curation
data-cleaning
dataorchestra
conversational
text-generation-inference
Run this model with HF Jobs
Run DataOrchestra/Orchestrator on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/DataOrchestra/Orchestrator. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/DataOrchestra/Orchestrator on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/DataOrchestra/Orchestrator. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/DataOrchestra/Orchestrator. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use DataOrchestra/Orchestrator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DataOrchestra/Orchestrator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DataOrchestra/Orchestrator") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DataOrchestra/Orchestrator") model = AutoModelForCausalLM.from_pretrained("DataOrchestra/Orchestrator", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DataOrchestra/Orchestrator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DataOrchestra/Orchestrator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataOrchestra/Orchestrator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DataOrchestra/Orchestrator
- SGLang
How to use DataOrchestra/Orchestrator with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "DataOrchestra/Orchestrator" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataOrchestra/Orchestrator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "DataOrchestra/Orchestrator" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataOrchestra/Orchestrator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DataOrchestra/Orchestrator with Docker Model Runner:
docker model run hf.co/DataOrchestra/Orchestrator
Import from GAIR/DataOrchestra; rename to Orchestrator, update model paths and arXiv link
Browse filesFiles changed (8)
- .gitattributes+1
- README.mdAdded+134
- chat_template.jinjaAdded+13
- config.jsonAdded+63
- generation_config.jsonAdded+10
- model.safetensorsAdded+3
- tokenizer.jsonAdded+3
- tokenizer_config.jsonAdded+15
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134---license: apache-2.0base_model: Qwen/Qwen3-1.7B-Baselanguage:- enlibrary_name: transformerspipeline_tag: text-generationtags:- pretraining-data- data-curation- data-cleaning- dataorchestra---
# DataOrchestra — Orchestrator Model
## Model Details
| | || --- | --- || Base model | [`Qwen/Qwen3-1.7B-Base`](https://huggingface.co/Qwen/Qwen3-1.7B-Base) || Role | Orchestrator (plan generator) || Input | one pretraining-data chunk (≤ 1024 Qwen3 tokens) || Output | a flat JSON plan (`decision` + NP / SR / PA) || Inference mode | non-thinking, greedy decoding |
## Usage
The wire format is a one-line system prompt plus the raw chunk wrapped in `[DOC]` / `[/DOC]`. The model responds with a single JSON plan.
```pythonimport jsonfrom transformers import AutoModelForCausalLM, AutoTokenizer
MODEL = "DataOrchestra/Orchestrator"tokenizer = AutoTokenizer.from_pretrained(MODEL)model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype="auto", device_map="auto")
SYSTEM_PROMPT = "You are an excellent orchestrator for pretraining data cleaning."
def plan_for_chunk(chunk: str) -> dict: messages = [ {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": f"[DOC]\n{chunk}\n[/DOC]"}, ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False, # orchestrator runs non-thinking ) inputs = tokenizer(text, return_tensors="pt").to(model.device) generated = model.generate( **inputs, max_new_tokens=1024, do_sample=False, # greedy: temperature 0.0 / top_p 1.0 ) response = tokenizer.decode( generated[0][inputs.input_ids.shape[1]:], skip_special_tokens=True ) return json.loads(response)
chunk = ( "Home | About | Contact\n\n" "The Pythagorean theorem states that a^2 + b^2 = c^2 for a right triangle. " "It is one of the most fundamental results in geometry.\n\n" "Click here to subscribe to our newsletter!")print(json.dumps(plan_for_chunk(chunk), indent=2, ensure_ascii=False))```
### Serving with vLLM
For high-throughput curation, serve the model with an OpenAI-compatible endpoint:
```bashvllm serve DataOrchestra/Orchestrator --served-model-name DataOrchestra-Orchestrator --trust-remote-code```
```pythonfrom openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="EMPTY")resp = client.chat.completions.create( model="DataOrchestra-Orchestrator", messages=[ {"role": "system", "content": "You are an excellent orchestrator for pretraining data cleaning."}, {"role": "user", "content": "[DOC]\n<your chunk here>\n[/DOC]"}, ], temperature=0.0, max_tokens=1024, extra_body={"chat_template_kwargs": {"enable_thinking": False}},)print(resp.choices[0].message.content)```
## Output Schema
The orchestrator returns a flat plan JSON:
```json{ "decision": "clean", "noise_pruning": true, "surface_rectification": "Remove the navigation header and the newsletter call-to-action; keep the statement of the theorem.", "pedagogical_augmentation": "Add an intuitive explanation of why a^2 + b^2 = c^2 holds, with a worked example."}```
| Field | Type | Meaning || --- | --- | --- || `decision` | `"drop"` \| `"untouch"` \| `"clean"` | top-level gate; only `clean` triggers the stages below || `noise_pruning` | `bool` | run the NP tool model (whole-line `remove_lines` edits) || `surface_rectification` | `str` \| `null` | if a string, run SR with this chunk-specific instruction; `null` skips || `pedagogical_augmentation` | `str` \| `null` | if a string, run PA with this chunk-specific instruction; `null` skips |
For `drop` / `untouch` decisions, all three stage fields are inert.
## Citation
If you find this work useful, please cite:
```bibtex@article{dataorchestra2026, title = {DataOrchestra: Learning to Orchestrate Per-Example Curation of Pretraining Data}, author = {Huang, Zhen and Wang, Yikun and Xia, Shijie and Liu, Pengfei}, year = {2026}, journal = {arXiv preprint arXiv:2607.24717}}```12345678910111213{%- if messages[0].role == 'system' %}{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}{%- endif %}{%- for message in messages %} {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }} {%- elif message.role == "assistant" %} {{- '<|im_start|>assistant\n' + message.content + '<|im_end|>' + '\n' }} {%- endif %}{%- endfor %}{%- if add_generation_prompt %}{{- '<|im_start|>assistant\n' }}{%- endif %}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263{ "architectures": [ "Qwen3ForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": null, "dtype": "bfloat16", "eos_token_id": 151645, "head_dim": 128, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 6144, "layer_types": [ "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention" ], "max_position_embeddings": 32768, "max_window_layers": 28, "model_type": "qwen3", "num_attention_heads": 16, "num_hidden_layers": 28, "num_key_value_heads": 8, "pad_token_id": 151643, "rms_norm_eps": 1e-06, "rope_parameters": { "rope_theta": 1000000, "rope_type": "default" }, "sliding_window": null, "tie_word_embeddings": true, "transformers_version": "5.2.0", "use_cache": false, "use_sliding_window": false, "vocab_size": 151936}12345678910{ "do_sample": false, "eos_token_id": [ 151645, 151643 ], "max_new_tokens": 2048, "pad_token_id": 151643, "transformers_version": "5.2.0"}123version https://git-lfs.github.com/spec/v1oid sha256:879e21e07f4d54560488538e27b5d97dae9cb54d4baaa5ad765822e38b48c84dsize 4063515640123version https://git-lfs.github.com/spec/v1oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506size 11422650123456789101112131415{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": null, "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "is_local": true, "model_max_length": 131072, "pad_token": "<|endoftext|>", "padding_side": "right", "split_special_tokens": false, "tokenizer_class": "Qwen2Tokenizer", "unk_token": null}.gitattributes+1
README.mdAdded+134
chat_template.jinjaAdded+13
config.jsonAdded+63
generation_config.jsonAdded+10
model.safetensorsAdded+3
tokenizer.jsonAdded+3
tokenizer_config.jsonAdded+15