huggingface.co
Total runs: 275
24-hour runs: 1
7-day runs: -8
30-day runs: 57
Model's Last Updated: November 20 2023
text-generation

Introduction of BPO

Model Details of BPO

Black-Box Prompt Optimization: Aligning Large Language Models without Model Training

Black-box Prompt Optimization (BPO)

BPO is a black-box alignment technique that differs from training-based methods (like PPO or DPO). BPO only requires training of a plug-and-play model and optimizes LLMs through optimizing user inputs. Therefore, it can be used on a variety of open-source or API-based LLMs.

Model Details
Data

Prompt优化模型由隐含人类偏好特征的prompt优化对训练得到,数据集的详细信息在这里。 The Prompt Optimization Model is trained on prompt optimization pairs which contain human preference features. Detailed information on the dataset can be found here .

Backbone Model

The prompt preference optimizer is built on Llama-2-7b-chat-hf .

Language

English

Performance
Model A Model B A win tie B win
gpt-3.5-turbo + BPO gpt-3.5-turbo 60.0 8.7 31.3
claude-2 + BPO claude-2 57.5 5.0 37.5
llama-2-13b-chat + BPO llama-2-70b-chat 61.3 0.0 38.7
vicuna-13b + BPO vicuna-13b + PPO 52.5 3.7 43.7
vicuna-13b + BPO vicuna-13b + DPO 53.8 2.5 43.7
vicuna-13b + DPO + BPO vicuna-13b + DPO 60.0 2.5 37.5
Intended Use
Prompt Template

We adopt a prompt template as

[INST] You are an expert prompt engineer. Please help me improve this prompt to get a more helpful and harmless response:\n{user prompt} [/INST]
Inference code

Here is an example code for inference:

from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = 'Your-Model-Path'

prompt_template = "[INST] You are an expert prompt engineer. Please help me improve this prompt to get a more helpful and harmless response:\n{} [/INST]"

model = AutoModelForCausalLM.from_pretrained(model_path).cuda()
tokenizer = AutoTokenizer.from_pretrained(model_path)

text = 'Tell me about Harry Potter'

prompt = prompt_template.format(text)
model_inputs = tokenizer(prompt, return_tensors="pt").to("cuda:0")
output = model.generate(**model_inputs, max_new_tokens=1024, do_sample=True, top_p=0.9, temperature=0.6, num_beams=1)
resp = tokenizer.decode(output[0], skip_special_tokens=True).split('[/INST]')[1].strip()

print(resp)

See our Github Repo for more detailed usage (e.g. more aggressive optimization).

Other Known Limitations
  • Task coverage is not sufficient, as we only used open-source data to get about 14k optimized prompts. Clearly, it is impossible to cover a wide range of user queries, so the current model may not perform well on every prompt.
  • Due to the small ratio of long-context-based tasks and mathematical problems, the prompt optimizer underperforms when dealing with these tasks.
Citation

If you find our model is useful in your work, please cite it with:

@article{cheng2023black,
  title={Black-Box Prompt Optimization: Aligning Large Language Models without Model Training},
  author={Cheng, Jiale and Liu, Xiao and Zheng, Kehan and Ke, Pei and Wang, Hongning and Dong, Yuxiao and Tang, Jie and Huang, Minlie},
  journal={arXiv preprint arXiv:2311.04155},
  year={2023}
}

Runs of zai-org BPO on huggingface.co

275
Total runs
1
24-hour runs
-3
3-day runs
-8
7-day runs
57
30-day runs

More Information About BPO huggingface.co Model

BPO huggingface.co

BPO huggingface.co is an AI model on huggingface.co that provides BPO's model effect (), which can be used instantly with this zai-org BPO model. huggingface.co supports a free trial of the BPO model, and also provides paid use of the BPO. Support call BPO model through api, including Node.js, Python, http.

zai-org BPO online free

BPO huggingface.co is an online trial and call api platform, which integrates BPO's modeling effects, including api services, and provides a free online trial of BPO, you can try BPO online for free by clicking the link below.

zai-org BPO online free url in huggingface.co:

https://huggingface.co/zai-org/BPO

BPO install

BPO is an open source model from GitHub that offers a free installation service, and any user can find BPO on GitHub to install. At the same time, huggingface.co provides the effect of BPO install, users can directly use BPO installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

BPO install url in huggingface.co:

https://huggingface.co/zai-org/BPO

Url of BPO

Provider of BPO huggingface.co

zai-org
ORGANIZATIONS

Other API from zai-org

huggingface.co

Total runs: 2.4M
Run Growth: 2.2M
Growth Rate: 100.00%
Updated:September 07 2026
huggingface.co

Total runs: 1.9M
Run Growth: -136.7K
Growth Rate: -7.29%
Updated:January 29 2026
huggingface.co

Total runs: 1.8M
Run Growth: -1.3M
Growth Rate: -71.57%
Updated:September 11 2026
huggingface.co

Total runs: 1.3M
Run Growth: -339.8K
Growth Rate: -25.19%
Updated:September 01 2026
huggingface.co

Total runs: 988.5K
Run Growth: -1.7M
Growth Rate: -177.76%
Updated:September 01 2026
huggingface.co

Total runs: 838.4K
Run Growth: 736.9K
Growth Rate: 98.82%
Updated:September 04 2026
huggingface.co

Total runs: 456.1K
Run Growth: -6.1K
Growth Rate: -1.34%
Updated:August 04 2024
huggingface.co

Total runs: 200.3K
Run Growth: -238.2K
Growth Rate: -104.95%
Updated:April 16 2026
huggingface.co

Total runs: 107.0K
Run Growth: -914.8K
Growth Rate: -696.12%
Updated:April 05 2026
huggingface.co

Total runs: 104.1K
Run Growth: -121.8K
Growth Rate: -118.84%
Updated:August 11 2025
huggingface.co

Total runs: 101.3K
Run Growth: 29.7K
Growth Rate: 29.53%
Updated:January 29 2026
huggingface.co

Total runs: 90.6K
Run Growth: 12.0K
Growth Rate: 13.31%
Updated:May 13 2026
huggingface.co

Total runs: 90.4K
Run Growth: -34.5K
Growth Rate: -39.22%
Updated:August 11 2025
huggingface.co

Total runs: 78.2K
Run Growth: -76.8K
Growth Rate: -101.51%
Updated:December 10 2025
huggingface.co

Total runs: 67.5K
Run Growth: -16.9K
Growth Rate: -25.06%
Updated:December 05 2024
huggingface.co

Total runs: 54.7K
Run Growth: -68.9K
Growth Rate: -124.27%
Updated:August 11 2026
huggingface.co

Total runs: 45.9K
Run Growth: -71.2K
Growth Rate: -158.18%
Updated:October 25 2025
huggingface.co

Total runs: 22.1K
Run Growth: 6.9K
Growth Rate: 30.99%
Updated:November 23 2024
huggingface.co

Total runs: 20.4K
Run Growth: -56.6K
Growth Rate: -277.32%
Updated:March 03 2025
huggingface.co

Total runs: 19.3K
Run Growth: -9.3K
Growth Rate: -48.01%
Updated:September 30 2025
huggingface.co

Total runs: 19.1K
Run Growth: -20.3K
Growth Rate: -103.22%
Updated:April 14 2025
huggingface.co

Total runs: 15.5K
Run Growth: 14.4K
Growth Rate: 96.76%
Updated:September 04 2026
huggingface.co

Total runs: 14.6K
Run Growth: -3.9K
Growth Rate: -26.89%
Updated:November 23 2024
huggingface.co

Total runs: 14.3K
Run Growth: -12.2K
Growth Rate: -85.22%
Updated:December 23 2025
huggingface.co

Total runs: 13.2K
Run Growth: 2.4K
Growth Rate: 17.87%
Updated:December 09 2025
huggingface.co

Total runs: 9.5K
Run Growth: -389
Growth Rate: -4.09%
Updated:January 15 2026
huggingface.co

Total runs: 8.1K
Run Growth: -1.9K
Growth Rate: -24.16%
Updated:October 16 2025
huggingface.co

Total runs: 7.0K
Run Growth: -1.5K
Growth Rate: -20.79%
Updated:March 11 2025
huggingface.co

Total runs: 6.9K
Run Growth: -7.1K
Growth Rate: -100.30%
Updated:April 22 2025
huggingface.co

Total runs: 4.4K
Run Growth: -4.1K
Growth Rate: -92.25%
Updated:December 09 2025
huggingface.co

Total runs: 3.7K
Run Growth: -5.4K
Growth Rate: -145.93%
Updated:January 27 2025
huggingface.co

Total runs: 3.1K
Run Growth: -998
Growth Rate: -31.29%
Updated:October 25 2025
huggingface.co

Total runs: 2.9K
Run Growth: 883
Growth Rate: 30.11%
Updated:August 04 2024
huggingface.co

Total runs: 1.6K
Run Growth: 660
Growth Rate: 35.97%
Updated:August 12 2025
huggingface.co

Total runs: 674
Run Growth: 279
Growth Rate: 41.21%
Updated:March 02 2023
huggingface.co

Total runs: 488
Run Growth: 266
Growth Rate: 59.64%
Updated:October 20 2023
huggingface.co

Total runs: 472
Run Growth: -278
Growth Rate: -59.78%
Updated:August 11 2025
huggingface.co

Total runs: 409
Run Growth: -1.0K
Growth Rate: -232.58%
Updated:January 02 2025
huggingface.co

Total runs: 393
Run Growth: 137
Growth Rate: 34.86%
Updated:December 10 2024
huggingface.co

Total runs: 356
Run Growth: -382
Growth Rate: -110.40%
Updated:October 25 2025
huggingface.co

Total runs: 291
Run Growth: 121
Growth Rate: 41.02%
Updated:March 02 2023
huggingface.co

Total runs: 262
Run Growth: 115
Growth Rate: 43.73%
Updated:October 20 2023
huggingface.co

Total runs: 253
Run Growth: 106
Growth Rate: 42.06%
Updated:October 20 2023