Model arithmetic is compatible with the LM Evaluation harness and can be used to run benchmarks. The article also provides instructions on how to reproduce the results presented in the paper "Controlled Text Generation via Language Model Arithmetic". It mentions the need for API keys for the PERSPECTIVE API and OpenAI, and the availability of processed datasets for reproducing the results. The article concludes with a citation for the work.
Key takeaways:
- The repository contains code for model arithmetic, a framework that combines language models and classifiers to control the attributes of generated text.
- Model arithmetic allows for the combination of prompts, models, and classifiers to create new, precisely controlled language models. It also supports the integration of classifiers into model arithmetic expressions to control the formality of the output.
- The library provides several operators that can be used in formulas, including the Union operator for adding a magic touch to the fairy tale, the TopPTopK operator for using nucleus and top-k sampling within a formula, and the Superseded operator for implementing speculative sampling directly.
- The model arithmetic is compatible with the LM Evaluation harness and can be used to reproduce the results presented in the paper, "Controlled Text Generation via Language Model Arithmetic".