Research Articles
Context Budgets for Foundation Model Inference: Cold Versus Warm Runs
Lina Hartfen (Machine Learning Laboratory, Valehart Institute of Computational Science), Emil Fieldmere (Machine Learning Laboratory, Valehart Institute of Computational Science), Devon Iverford (Machine Learning Laboratory, Eastmarsh Institute for Applied Computing)
Vol. 7 No. 1 (2023) · pp. 113–125 · Published 4 August 2023
Abstract
For a mix of fresh-start and steady-state trials, we construct a synthetic comparison between allocating context according to estimated relevance and position and retaining the first tokens up to a fixed limit. Each configuration is evaluated on the same 160 cases. In the 40 stress cases, needed evidence must appear late and compete with near duplicates; initialization cost is kept in the comparison instead of discarding the first completed trial. A case counts as a pass only if it meets this criterion: the model must answer the held-out question with the correct supporting span. The comparison holds the training and selection splits fixed across alternatives; evaluation cases are not reused for tuning. Compute or memory assigned to an alternative counts toward its budget even if training does not finish. The first configuration passes 121 of 160 cases, versus 110 for the comparator. In the stress subset, the respective counts are 22 and 17 of 40. The alternative exceeds the comparator overall by 6.9 percentage points. The practical trade-off is that aggressive selection can drop premises that are individually uninformative. A subsequent evaluation should set tolerances independently and repeat the comparison on workloads not used to select the configuration.
Keywords: foundation models, attention, long context, cold versus warm runs, synthetic evaluation
References
- Aminabadi, R. Y., et al. (2022). DeepSpeed-Inference: Enabling efficient inference of transformer models at unprecedented scale. Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, Article 46.
- Chan, S. C. Y., et al. (2022). Data distributional properties drive emergent in-context learning in transformers. Advances in Neural Information Processing Systems, 35, 18878–18891.
- Creswell, A., Shanahan, M., & Higgins, I. (2022). Selection-inference: Exploiting large language models for interpretable logical reasoning. arXiv:2205.09712.
- Dai, Z., Yang, Z., Yang, Y., Carbonell, J., Le, Q. V., & Salakhutdinov, R. (2019). Transformer-XL: Attentive language models beyond a fixed-length context. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 2978–2988.
- Fedus, W., Zoph, B., & Shazeer, N. (2022). Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120), 1–39. Source
- Fu, D. Y., Dao, T., Saab, K. K., Thomas, A. W., Rudra, A., & Ré, C. (2022). Hungry hungry hippos: Towards language modeling with state space models. arXiv:2212.14052.
- He, J., et al. (2022). FasterMoE: Modeling and optimizing training of large-scale dynamic pre-trained models. Proceedings of the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming.
- Huang, W., et al. (2022). Inner monologue: Embodied reasoning through planning with language models. arXiv:2207.05608.
- Kadavath, S., et al. (2022). Language models (mostly) know what they know. arXiv:2207.05221.
- Kandpal, N., Deng, H., Roberts, A., Wallace, E., & Raffel, C. (2022). Large language models struggle to learn long-tail knowledge. arXiv:2211.08411.
- Katharopoulos, A., Vyas, A., Pappas, N., & Fleuret, F. (2020). Transformers are RNNs: Fast autoregressive transformers with linear attention. Proceedings of the 37th International Conference on Machine Learning, 5156–5165.
- Kung, T. H., et al. (2022). Performance of ChatGPT on USMLE: Potential for AI-assisted medical education using large language models. medRxiv [Preprint]. DOI
- Lee, K., et al. (2021). Deduplicating training data makes language models better. arXiv:2107.06499.
- Mallen, A., Asai, A., Zhong, V., Das, R., Hajishirzi, H., & Khashabi, D. (2022). When not to trust language models: Investigating effectiveness and limitations of parametric and non-parametric memories. arXiv:2212.10511.
- Yuksekgonul, M., Bianchi, F., Kalluri, P., Jurafsky, D., & Zou, J. (2022). When and why vision-language models behave like bags-of-words, and what to do about it? arXiv:2210.01936.
- Zhu, C., et al. (2020). Modifying memories in transformer models. arXiv:2012.00363.
